/* Admin Styles */
.admin-body {
    background: #f1f5f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Admin Login Styles */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.admin-login-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.admin-login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

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

.admin-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 20px;
}

.admin-logo i {
    font-size: 28px;
}

.admin-login-header h2 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.admin-login-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.admin-login-form {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #3b82f6;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.admin-login-btn {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-login-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.admin-login-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.demo-credentials {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.demo-credentials h4 {
    color: #0369a1;
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-credentials p {
    color: #0369a1;
    margin: 5px 0;
    font-size: 0.85rem;
}

.back-to-site {
    text-align: center;
}

.back-to-site a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.back-to-site a:hover {
    color: #3b82f6;
}

/* Admin Dashboard Styles */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: #1e293b;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: #334155;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    border-bottom: 1px solid #334155;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #334155;
    color: white;
}

.nav-item.active .nav-link {
    background: #3b82f6;
    color: white;
}

.nav-link i {
    font-size: 18px;
    width: 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid #334155;
}

.logout-btn {
    width: 100%;
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logout-btn:hover {
    background: #dc2626;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    background: #f8fafc;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
}

#pageTitle {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1e293b;
    margin: 0;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-info {
    text-align: right;
}

.admin-name {
    display: block;
    font-weight: 600;
    color: #1e293b;
}

.admin-role {
    font-size: 0.85rem;
    color: #64748b;
}

.profile-avatar {
    width: 45px;
    height: 45px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.admin-content {
    padding: 30px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: #3b82f6; }
.stat-card:nth-child(2) .stat-icon { background: #10b981; }
.stat-card:nth-child(3) .stat-icon { background: #f59e0b; }
.stat-card:nth-child(4) .stat-icon { background: #ef4444; }

.stat-info h3 {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 0.85rem;
}

.stat-change.positive { color: #10b981; }
.stat-change.negative { color: #ef4444; }
.stat-change.neutral { color: #64748b; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-card h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.activity-item i {
    width: 35px;
    height: 35px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.activity-item p {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 2px;
}

.activity-item span {
    font-size: 0.85rem;
    color: #64748b;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.quick-action-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #64748b;
    font-weight: 500;
}

.quick-action-btn:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    color: #3b82f6;
}

.quick-action-btn i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-header h2 {
    color: #1e293b;
    font-size: 1.8rem;
    margin: 0;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.admin-table td {
    color: #64748b;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.active { background: #dcfce7; color: #166534; }
.status.pending { background: #fef3c7; color: #92400e; }
.status.completed { background: #dcfce7; color: #166534; }
.status.failed { background: #fecaca; color: #991b1b; }

.btn-edit, .btn-delete, .btn-approve, .btn-reject, .btn-view {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.btn-edit { color: #3b82f6; }
.btn-edit:hover { background: #dbeafe; }

.btn-delete { color: #ef4444; }
.btn-delete:hover { background: #fecaca; }

.btn-approve { color: #10b981; }
.btn-approve:hover { background: #dcfce7; }

.btn-reject { color: #ef4444; }
.btn-reject:hover { background: #fecaca; }

.btn-view { color: #64748b; }
.btn-view:hover { background: #f1f5f9; }

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #64748b;
}

.filter-btn.active,
.filter-btn:hover {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

/* Packages Admin Grid */
.packages-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.package-admin-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
}

.package-admin-card.popular {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.package-admin-card h3 {
    color: #1e293b;
    margin-bottom: 10px;
}

.package-price {
    color: #10b981;
    font-weight: 600;
    margin-bottom: 5px;
}

.package-discount {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.package-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.package-actions .btn-edit,
.package-actions .btn-delete {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Rates Grid */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.rate-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rate-card h3 {
    color: #1e293b;
    margin-bottom: 20px;
}

.rate-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.rate-input-group label {
    color: #64748b;
    font-weight: 500;
}

.rate-input-group input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.rate-input-group span {
    color: #64748b;
    font-weight: 500;
}

.btn-update {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-update:hover {
    background: #2563eb;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.setting-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.setting-card h3 {
    color: #1e293b;
    margin-bottom: 10px;
}

.setting-card p {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #3b82f6;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.setting-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.setting-input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-main {
        margin-left: 0;
    }

    .mobile-sidebar-toggle {
        display: block;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 20px;
    }

    .admin-header {
        padding: 15px 20px;
    }

    #pageTitle {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }

    .rates-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .packages-admin-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .admin-login-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .admin-content {
        padding: 15px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .profile-info {
        display: none;
    }
}