/* ========================================
   ADMIN PANEL MASTER STYLESHEET
   Location: admin/assets/css/admin.css
   ======================================== */

/* ===== 1. CSS VARIABLES & GLOBAL STYLES ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1f2937;
    --gray: #6b7280;
    --light: #f3f4f6;
    --white: #ffffff;
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 8px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* ===== 2. LOGIN PAGE STYLES ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    color: var(--dark);
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all 0.3s;
}

.login-box input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
}

.demo-credentials {
    background: var(--light);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    font-size: 13px;
    color: var(--gray);
}

/* ===== 3. ADMIN LAYOUT ===== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== 4. SIDEBAR STYLES ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--dark);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
}

.sidebar-header h3 i {
    color: var(--primary);
    margin-right: 10px;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu .menu-section {
    padding: 20px 20px 10px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--primary);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* ===== 5. MAIN CONTENT AREA ===== */
.main-content {
    /* flex: 1;
    margin-left: var(--sidebar-width); */
    background: var(--light);
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 0;
    width: 100%;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* When sidebar is active */
.sidebar.active~.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* ===== 6. HEADER/NAVBAR STYLES ===== */
.main-header {
    position: sticky;
    z-index: 1100;
    top: 0;
    background: var(--white);
    padding: 0 30px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--box-shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray);
    cursor: pointer;
}


.sidebar-toggle-desktop {
    z-index: 1100;
    background: var(--white);
    border: none;
    font-size: 22px;
    color: var(--gray);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: left 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.sidebar-toggle-desktop:hover {
    color: var(--primary);
}

.sidebar.active~.sidebar-toggle-desktop {
    left: calc(var(--sidebar-width) + 20px);
}


.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
}

.username {
    font-weight: 500;
    color: var(--dark);
}

.logout-btn {
    color: var(--danger);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--danger);
    border-radius: var(--border-radius);
    transition: all 0.3s;
}

.logout-btn:hover {
    background: var(--danger);
    color: var(--white);
}

/* ===== 7. CONTENT AREA ===== */
.content {
    padding: 30px;
}

/* ===== 8. DASHBOARD CARDS ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    flex-direction: column;
    /* justify-content: space-between; */
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-heading-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.card h2 {
    margin: 0px 10px;
}

.card-info h4 {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-info p {
    font-size: 32px;
    text-align: center;
    font-weight: 700;
    color: var(--dark);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
}

/* ===== 9. TABLES ===== */
.table-responsive {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    width: 100%;
    box-shadow: var(--box-shadow);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px;
    background: var(--light);
    color: var(--dark);
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.data-table tr:hover {
    background: rgba(243, 244, 246, 0.5);
}

/* ===== 10. BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #0ea271;
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-warning:hover {
    background: #d97706;
}

.btn-edit {
    background: var(--warning);
    color: var(--white);
}

.btn-delete {
    background: var(--danger);
    color: var(--white);
}

.btn-edit:hover,
.btn-delete:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* ===== 11. FORMS ===== */
.form-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    /* max-width: 800px; */
    margin: 0 auto;
    width: 70%;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== 12. FILE UPLOAD ===== */
.file-upload {
    border: 2px dashed #e5e7eb;
    padding: 30px;
    text-align: center;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.file-upload i {
    font-size: 48px;
    color: var(--gray);
    margin-bottom: 10px;
}

.file-upload p {
    color: var(--dark);
    margin-bottom: 5px;
}

/* ===== 13. ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

.alert i {
    margin-right: 10px;
}

/* ===== 14. BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

/* ===== 15. EXPERIENCE POINTS ===== */
.points-container {
    background: var(--light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 10px;
}

.points-list {
    margin-bottom: 20px;
}

.point-item {
    background: var(--white);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
}

.point-actions {
    display: flex;
    gap: 10px;
}

.add-point-form {
    margin-top: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
}

/* ===== 16. SKILLS DISPLAY ===== */
.skills-category {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.skill-tag {
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

/* ===== 17. EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--gray);
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

/* ===== 18. RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .sidebar {
        width: 0;
        left: -260px;
    }

    .sidebar.active {
        width: var(--sidebar-width);
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .user-info .username {
        display: none;
    }

    .page-title {
        font-size: 20px;
    }

    .main-header {
        padding: 0 20px;
    }

    .sidebar-header h3 {
        width: 90%;
        display: flex;
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    .card {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-sm {
        width: 100%;
        text-align: center;
    }
}

/* ===== 19. PRINT STYLES ===== */
@media print {

    .sidebar,
    .main-header,
    .btn,
    .action-buttons {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .card {
        break-inside: avoid;
    }
}

/* ===== SIDEBAR TOGGLE STYLES ===== */

/* Sidebar Header with Close Button */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
}

.sidebar-header h3 i {
    color: var(--primary);
    margin-right: 10px;
}

.sidebar-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    display: none;
    transition: all 0.3s;
}

.sidebar-close:hover {
    color: var(--white);
    transform: rotate(90deg);
}

/* Sidebar Toggle Button (in header) */
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
    display: none;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    color: var(--primary);
}

/* Sidebar Overlay (for mobile) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-version {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* Active Menu Item */
.sidebar-menu a.active {
    background: rgba(37, 99, 235, 0.2);
    color: var(--white);
    border-left-color: var(--primary);
    position: relative;
}

.sidebar-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        /* left: -280px; */
        top: 0;
        height: 100vh;
        width: 260px;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .main-header {
        padding-left: 20px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 85%;
        max-width: 300px;
        /* left: -100%; */
    }

    .sidebar.active {
        left: 0;
    }

    .user-info .username {
        display: none;
    }

    .logout-btn span {
        display: none;
    }

    .logout-btn i {
        margin: 0;
    }
}

/* Animation for sidebar items */
.sidebar-menu li {
    animation: slideIn 0.3s ease;
    animation-fill-mode: both;
}

.sidebar-menu li:nth-child(1) {
    animation-delay: 0.05s;
}

.sidebar-menu li:nth-child(2) {
    animation-delay: 0.1s;
}

.sidebar-menu li:nth-child(3) {
    animation-delay: 0.15s;
}

.sidebar-menu li:nth-child(4) {
    animation-delay: 0.2s;
}

.sidebar-menu li:nth-child(5) {
    animation-delay: 0.25s;
}

.sidebar-menu li:nth-child(6) {
    animation-delay: 0.3s;
}

.sidebar-menu li:nth-child(7) {
    animation-delay: 0.35s;
}

.sidebar-menu li:nth-child(8) {
    animation-delay: 0.4s;
}

.sidebar-menu li:nth-child(9) {
    animation-delay: 0.45s;
}

.sidebar-menu li:nth-child(10) {
    animation-delay: 0.5s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dropdown menu (for future use) */
.sidebar-menu .has-dropdown {
    position: relative;
}

.sidebar-menu .has-dropdown>a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    transition: transform 0.3s;
}

.sidebar-menu .has-dropdown.open>a::after {
    transform: rotate(180deg);
}

.sidebar-menu .dropdown-menu {
    display: none;
    padding-left: 20px;
}

.sidebar-menu .has-dropdown.open .dropdown-menu {
    display: block;
}

/* Smooth transitions */
.sidebar,
.sidebar-overlay,
.sidebar-toggle i,
sidebar-toggle-desktop,
.sidebar-close i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* ================= NOTIFICATIONS ================= */

.notification-wrapper {
    position: relative;
    cursor: pointer;
}

.notification-wrapper i {
    font-size: 20px;
    color: var(--dark);
}

.notification-wrapper .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    font-size: 8px;
    padding: 2px 7px;
    border-radius: 50%;
    font-weight: 600;
}

/* Dropdown */
.notification-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
}

/* Show dropdown on hover */
.notification-wrapper:hover + .notification-dropdown,
.notification-dropdown:hover {
    display: block;
}

/* Items */
.notification-item {
    padding: 12px 15px;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s ease;
    display: block;
    width: 100%;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item strong {
    font-size: 14px;
}

.notification-item small, .notification-timestamp {
    font-size: 12px;
    color: #6b7280;
}

/* Empty state */
.notification-empty {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}


/* ================= MESSAGE TABLE ================= */

.message-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.message-table thead {
    background: #f9fafb;
}

.message-table th,
.message-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.message-table th {
    font-weight: 600;
    color: #374151;
}

.message-table tr:hover {
    background: #f9fafb;
}

.message-text {
    max-width: 300px;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}


/* ================= NOTIFICATIONS TABLE ================= */

.notification-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.notification-table th,
.notification-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.notification-table th {
    background: #f9fafb;
    font-weight: 600;
}

.notification-table tr.unread {
    background: #eff6ff;
}

.status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status.read {
    background: #e5e7eb;
    color: #374151;
}

.status.unread {
    background: #dbeafe;
    color: #1d4ed8;
}
