* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.admin-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, #228B22 0%, #4A90E2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.admin-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
    pointer-events: none;
}

.nav-dropdown.active .nav-dropdown-menu {
    pointer-events: auto;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.nav-dropdown-item:hover {
    background: #f8f9fa;
    border-left-color: #228B22;
    color: #228B22;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .admin-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, #228B22 0%, #4A90E2 100%);
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 0.5rem;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3);
        overflow-y: auto;
    }

    .admin-nav.active {
        right: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        width: 100%;
    }

    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile Dropdown Styles */
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0,0,0,0.2);
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
    }
    
    .nav-dropdown-item {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        color: rgba(255,255,255,0.9);
        border-left: 3px solid transparent;
    }
    
    .nav-dropdown-item:hover {
        background: rgba(255,255,255,0.1);
        border-left-color: white;
        color: white;
    }
    
    .dropdown-arrow {
        margin-left: auto;
    }

    .header-content {
        padding: 0 1rem;
    }
}

.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #666;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 3rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #228B22;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

.activity-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.activity-section h2 {
    margin-bottom: 1rem;
    color: #333;
}

.activity-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.activity-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-label {
    color: #666;
    font-size: 0.9rem;
}

.activity-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.activity-value.blocked {
    color: #e74c3c;
}

.activity-value.allowed {
    color: #27ae60;
}

.recent-logs {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recent-logs h2 {
    margin-bottom: 1rem;
    color: #333;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-danger {
    background: #fee;
    color: #c33;
}

.badge-success {
    background: #efe;
    color: #3c3;
}

.text-center {
    text-align: center;
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #228B22;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #228B22;
    color: white;
}

.btn-primary:hover {
    background: #1a6b1a;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* Page header with actions */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #333;
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

