/* --- Basic Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* =======================================================
   ULTRA-PREMIUM LOGIN PAGE DESIGN (GLASSMORPHISM)
   ======================================================= */

.login-body {
    background: linear-gradient(135deg, #e4ebfb 0%, #f4f7fe 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Abstract Background Shapes for Premium Feel */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}
.bg-shape-1 {
    width: 400px; height: 400px;
    background: rgba(67, 24, 255, 0.15);
    top: -100px; left: -100px;
    animation: float 8s ease-in-out infinite;
}
.bg-shape-2 {
    width: 300px; height: 300px;
    background: rgba(5, 205, 153, 0.1);
    bottom: -50px; right: -50px;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(20px) scale(1.05); }
    100% { transform: translateY(0px) scale(1); }
}

/* Glassmorphism Login Card */
.login-container {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 50px 45px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px rgba(43, 54, 116, 0.08), inset 0 2px 2px rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 430px;
    z-index: 1;
    /* Entrance Animation */
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

/* Gradient Text Effect */
.login-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #2b3674 0%, #4318ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.login-header h2 span {
    background: linear-gradient(135deg, #4318ff 0%, #05cd99 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: #a3aed1;
    font-size: 15px;
    font-weight: 500;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    color: #2b3674;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

/* Sleek Inputs */
.input-group input {
    width: 100%;
    padding: 15px 18px;
    background: rgba(244, 247, 254, 0.8);
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 15px;
    color: #2b3674;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: #a3aed1;
}

.input-group input:focus {
    background: #ffffff;
    border-color: #4318ff;
    box-shadow: 0 10px 20px rgba(67, 24, 255, 0.08);
    transform: translateY(-1px);
}

/* Gorgeous Button */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #4318ff 0%, #3311cc 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(67, 24, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(67, 24, 255, 0.35);
}

.login-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(67, 24, 255, 0.2);
}

.error-message {
    color: #ff3d00;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    min-height: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid rgba(224, 229, 242, 0.8);
    padding-top: 20px;
}

.login-footer p {
    color: #a3aed1;
    font-size: 13px;
    font-weight: 500;
}

/* =======================================================
   DASHBOARD LAYOUT
   ======================================================= */
.dashboard-body {
    display: flex;
    background-color: #f4f7fe;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #ffffff;
    box-shadow: 2px 0px 15px rgba(0,0,0,0.05);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #2b3674;
    margin-bottom: 40px;
    text-align: center;
}

.logo span { color: #4318ff; }

.nav-links { list-style: none; }

.nav-links li {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    color: #a3aed1;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-links li:hover, .nav-links li.active {
    background-color: #4318ff;
    color: white;
}

.nav-links li.logout {
    margin-top: auto;
    background-color: #ffe6e6;
    color: #ff3d00;
}

.main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h2 { color: #2b3674; font-size: 24px; }
.user-profile { background: #fff; padding: 10px 20px; border-radius: 20px; font-weight: 600; color: #2b3674; box-shadow: 0px 5px 15px rgba(0,0,0,0.05); }

/* Overview Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0px 5px 20px rgba(0,0,0,0.03);
}

.card h3 { color: #a3aed1; font-size: 14px; margin-bottom: 10px; }
.card h1 { color: #2b3674; font-size: 32px; }

.status-card { background: #2b3674; color: white; }
.status-card h3 { color: #a3aed1; }
.status-card h1 { font-size: 24px; margin-bottom: 5px; }
.status-ok { color: #05cd99 !important; }
.status-card p { font-size: 12px; color: #a3aed1; }

/* Worker Management Section */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.section-title h3 { color: #2b3674; font-size: 20px; }

.add-btn {
    background-color: #4318ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.add-btn:hover { background-color: #3311cc; }

.table-container {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0px 5px 20px rgba(0,0,0,0.03);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }
thead tr { background-color: #f4f7fe; text-align: left; }
th { padding: 15px; color: #a3aed1; font-size: 14px; font-weight: 600; }
td { padding: 15px; border-bottom: 1px solid #e0e5f2; color: #2b3674; font-size: 14px; font-weight: 500; }
tr:last-child td { border-bottom: none; }

.action-btn { padding: 6px 12px; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.delete-btn { background-color: #ffe6e6; color: #ff3d00; }
.delete-btn:hover { background-color: #ffccce; }

/* Security Loader */
#securityLoader {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f4f7fe;
    color: #2b3674;
    font-size: 24px;
    font-weight: bold;
}

/* Tab Transition */
.tab-content { animation: fadeIn 0.5s; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal / Popup Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(43, 54, 116, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0px 15px 30px rgba(0,0,0,0.1);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #a3aed1;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover { color: #ff3d00; }
.modal-content h3 { color: #2b3674; margin-bottom: 20px; font-size: 20px; }

/* Article Reading Modal */
.article-reader-content {
    background: #f9fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e5f2;
    margin-top: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #2b3674;
}

.action-buttons { display: flex; gap: 10px; }
.approve-btn { background-color: #05cd99; color: white; flex: 1; padding: 10px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; }
.approve-btn:hover { background-color: #04b082; }
.reject-btn { background-color: #ff3d00; color: white; flex: 1; padding: 10px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; }
.reject-btn:hover { background-color: #e63600; }

/* =======================================================
   ULTRA RESPONSIVE & PREMIUM HAMBURGER MENU
   ======================================================= */

/* --- Tablet Devices --- */
@media (max-width: 1024px) {
    .cards-container { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Mobile Header Wrapper */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Hamburger Button (Hidden on Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.menu-toggle svg {
    width: 32px;
    height: 32px;
    fill: #2b3674;
}

/* --- Mobile Devices (Smartphones) --- */
@media (max-width: 768px) {
    .dashboard-body {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    /* Top Sticky Navbar */
    .sidebar {
        width: 100%;
        height: auto;
        padding: 15px 20px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0px 5px 20px rgba(0,0,0,0.05);
        z-index: 1000;
        position: sticky;
        top: 0;
        display: block;
    }

    .logo { margin-bottom: 0; font-size: 22px; }
    .menu-toggle { display: block; }

    /* Dropdown Menu (Floating Overlay) */
    .nav-links {
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(15px); 
        border-radius: 0 0 15px 15px;
        box-shadow: 0px 15px 30px rgba(0,0,0,0.1);
        padding: 15px;
        border: 1px solid #e0e5f2;
        border-top: none;
        z-index: 9999; 
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-links.active-menu { display: flex; }
    .nav-links li { width: 100%; text-align: left; padding: 12px 15px; font-size: 15px; }
    .nav-links li.logout { margin-top: 5px; }

    /* Main Content */
    .main-content { 
        padding: 20px 15px; 
        position: relative; 
        z-index: 1;
    }
    
    .header { flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 25px; }
    .user-profile { width: 100%; text-align: center; }
    .cards-container { grid-template-columns: 1fr !important; gap: 15px; }
    .section-title { flex-direction: column; align-items: flex-start; gap: 15px; }
    .add-btn { width: 100%; text-align: center; }
    .table-container { padding: 10px; border-radius: 10px; overflow-x: auto; }
    th, td { padding: 12px 10px; font-size: 13px; }
    .modal-content { width: 95%; padding: 20px; }
    .action-buttons { flex-direction: column; }
    
    /* Login Page Mobile Fix */
    .login-container {
        padding: 40px 25px;
        width: 90%;
    }
}

/* --- Small Mobiles --- */
@media (max-width: 480px) {
    .logo { font-size: 18px; }
    .header h2 { font-size: 20px; }
    .login-header h2 { font-size: 24px; }
}