/* Network Africa Admin Panel - Dark Theme */
:root {
    --primary-black: #000000;
    --primary-gold: #FFC107;
    --accent-gold: #E9A740;
    --bg-dark: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-hover: #333333;
    --text-white: #FFFFFF;
    --text-gray: #CCCCCC;
    --text-muted: #999999;
    --border-color: #333333;
    --success: #4CAF50;
    --danger: #F44336;
    --warning: #FF9800;
    --info: #2196F3;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--primary-black);
    color: var(--text-white);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.login-box {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 5px;
}

.login-logo p {
    font-size: 14px;
    color: var(--accent-gold);
}

.login-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2px;
}

.sidebar-logo p {
    font-size: 12px;
    color: var(--accent-gold);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.nav-link.active {
    background: var(--bg-card);
    color: var(--primary-gold);
    border-right: 3px solid var(--primary-gold);
}

.nav-icon {
    font-size: 18px;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--bg-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-black);
    font-weight: 700;
    font-size: 14px;
}

.user-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 2px;
}

.user-details p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--primary-black);
}

.content-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.content-body {
    padding: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-white);
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Form Input (for all input types, textarea, select) */
.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-white);
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.form-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Select dropdown arrow styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* File input styling */
input[type="file"] {
    padding: 10px 12px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    padding: 8px 16px;
    background: var(--bg-card);
    color: var(--text-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-right: 12px;
    transition: all 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--bg-hover);
    border-color: var(--primary-gold);
}

/* Filter input specific styling */
.filter-input {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-white);
    font-size: 14px;
    min-width: 250px;
}

.filter-input::placeholder {
    color: var(--text-muted);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

/* Form error messages */
.form-error {
    display: block;
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 40px;
    box-sizing: border-box;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-gold);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-white);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-block {
    width: 100%;
}

.btn svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

.btn svg.icon-left {
    margin-right: 6px;
}

.btn svg.icon-right {
    margin-left: 8px;
    width: 14px;
    height: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.gold { background: rgba(255, 193, 7, 0.1); color: var(--primary-gold); }
.stat-icon.green { background: rgba(76, 175, 80, 0.1); color: var(--success); }
.stat-icon.blue { background: rgba(33, 150, 243, 0.1); color: var(--info); }
.stat-icon.red { background: rgba(244, 67, 54, 0.1); color: var(--danger); }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
}

.stat-footer {
    font-size: 13px;
    color: var(--text-muted);
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.table-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
}

.table-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input, .filter-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-white);
    font-size: 14px;
    height: 40px;
    box-sizing: border-box;
}

.search-input {
    min-width: 250px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Filter form */
.filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

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

.data-table thead {
    background: var(--bg-dark);
}

.data-table th {
    padding: 16px 24px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-white);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: rgba(76, 175, 80, 0.2); color: var(--success); }
.badge-danger { background: rgba(244, 67, 54, 0.2); color: var(--danger); }
.badge-warning { background: rgba(255, 152, 0, 0.2); color: var(--warning); }
.badge-info { background: rgba(33, 150, 243, 0.2); color: var(--info); }
.badge-secondary { background: rgba(255, 255, 255, 0.1); color: var(--text-gray); }
.badge-default { background: rgba(255, 255, 255, 0.1); color: var(--text-gray); }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-buttons form {
    display: inline-flex;
    margin: 0;
}

.action-buttons a,
.action-buttons button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--bg-dark);
    color: var(--text-gray);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
    padding: 0;
}

.action-buttons a:hover,
.action-buttons button:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.action-buttons a.info { color: var(--info); }
.action-buttons button.success { color: var(--success); }
.action-buttons button.danger { color: var(--danger); }
.action-buttons button.warning { color: var(--warning); }

.action-buttons a svg {
    width: 20px;
    height: 20px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--bg-dark);
    color: var(--text-gray);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.btn-icon.success { color: var(--success); }
.btn-icon.danger { color: var(--danger); }
.btn-icon.warning { color: var(--warning); }
.btn-icon.info { color: var(--info); }

.btn-icon.success:hover { background: var(--success); color: white; }
.btn-icon.danger:hover { background: var(--danger); color: white; }

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-white);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--primary-gold);
}

.pagination .active span {
    background: var(--primary-gold);
    color: var(--primary-black);
    border-color: var(--primary-gold);
}

.pagination .disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Hide pagination icons */
.pagination svg {
    display: none !important;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
}

.card-body {
    padding: 24px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-in-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

