/* Admin Styles */

/* Login Page */
.admin-login-body {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

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

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

.login-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.95rem;
}

.login-form label i {
    margin-right: 0.5rem;
    color: #1e40af;
}

.login-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.875rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Admin Body */
.admin-body {
    background: #f8fafc;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Admin Navbar */
.admin-navbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
}

.admin-logo i {
    font-size: 1.75rem;
    color: #dc2626;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user span {
    color: #64748b;
    font-size: 0.9rem;
}

.btn-logout {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Admin Container */
.admin-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 73px);
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 0;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.menu-item a i {
    font-size: 1.1rem;
    width: 20px;
}

.menu-item a:hover {
    background: #f8fafc;
    color: #1e40af;
}

.menu-item.active a {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border-right: 3px solid #dc2626;
}

/* Main Content */
.admin-content {
    flex: 1;
    padding: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 2rem;
    color: #1e293b;
    margin: 0;
}

/* Dashboard Stats */
.dashboard-stats {
    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 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #1e40af;
    margin: 0 0 0.25rem 0;
}

.stat-info p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-card h2 {
    font-size: 1.25rem;
    color: #1e293b;
    margin: 0 0 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.quick-actions, .website-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn, .website-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn:hover, .website-link:hover {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
    transform: translateX(4px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modal form {
    padding: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group small {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Data Table */
.data-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.data-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

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

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.loading-cell, .empty-cell, .error-cell {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
    font-style: italic;
}

.error-cell {
    color: #dc2626;
}

/* Action Buttons in Table */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

.btn-edit:hover {
    background: #2563eb;
    transform: scale(1.1);
}

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

.btn-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.badge {
    background: #e2e8f0;
    color: #475569;
}

.badge-business { background: #dbeafe; color: #1e40af; }
.badge-accounting { background: #dcfce7; color: #166534; }
.badge-hr { background: #fef3c7; color: #92400e; }
.badge-training { background: #e0e7ff; color: #3730a3; }
.badge-marketing { background: #fce7f3; color: #9f1239; }
.badge-regulatory { background: #f3e8ff; color: #6b21a8; }
.badge-legal { background: #fef2f2; color: #991b1b; }
.badge-other { background: #f1f5f9; color: #334155; }
.badge-featured { background: #dc2626; color: white; margin-left: 0.5rem; }

/* Packages Grid Admin */
.packages-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.package-card-admin {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.package-card-admin:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.package-card-admin.featured {
    border: 2px solid #1e40af;
}

.package-ribbon {
    position: absolute;
    top: 1rem;
    right: -0.5rem;
    background: #dc2626;
    color: white;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.package-header h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.package-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.package-price .currency {
    font-size: 1.25rem;
    color: #1e40af;
}

.package-price .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e40af;
}

.package-price .period {
    color: #64748b;
    font-size: 1rem;
}

.package-description {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.package-features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.package-features li {
    padding: 0.5rem 0;
    color: #334155;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.package-features li i {
    color: #10b981;
    margin-top: 0.25rem;
}

.package-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.package-actions .btn {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
}

.loading-message, .empty-message, .error-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
    font-style: italic;
    grid-column: 1 / -1;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-package {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-package:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1rem 0;
    }

    .menu-item a {
        padding: 0.75rem 1rem;
    }

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

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

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 100%;
    }

    .data-table-container {
        overflow-x: auto;
    }

    .packages-grid-admin {
        grid-template-columns: 1fr;
    }
}
