/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Login Page Styles */
.login-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    max-width: 500px;
    width: 100%;
    margin: 50px auto;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: #1e3c72;
    font-size: 36px;
    margin-bottom: 5px;
}

.logo p {
    color: #666;
    font-size: 16px;
    font-weight: 600;
    margin-top: 5px;
}

.logo small {
    color: #999;
    font-size: 13px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 15px rgba(30, 60, 114, 0.2);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 60, 114, 0.4);
}

.error-message, .success-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-message {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.demo-credentials {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #ffc107;
}

.demo-credentials h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 14px;
}

.demo-credentials p {
    color: #856404;
    font-size: 13px;
    margin: 5px 0;
}

/* Dashboard Styles */
.dashboard-container {
    display: none;
    max-width: 1600px;
    margin: 0 auto;
}

.header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header h1 {
    color: #1e3c72;
    font-size: 32px;
    margin-bottom: 5px;
}

.header p {
    color: #666;
    margin-top: 5px;
}

.header-right {
    text-align: right;
}

.header-right h3 {
    color: #333;
    font-size: 18px;
}

.header-right p {
    color: #666;
    font-size: 14px;
}

.logout-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* Navigation Tabs */
.nav-tabs {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    background: #f5f5f5;
    color: #333;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card h1 {
    color: #1e3c72;
    font-size: 42px;
    margin-bottom: 10px;
}

.stat-card p {
    color: #999;
    font-size: 13px;
}

.mini-stat {
    text-align: center;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
}

.mini-stat h3 {
    font-size: 36px;
    color: #1e3c72;
    margin-bottom: 10px;
}

.mini-stat p {
    color: #666;
    font-size: 14px;
}

/* Card Styles */
.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.card h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

/* Button Styles */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-warning:hover {
    background: #e68900;
    transform: translateY(-2px);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

table tr {
    transition: all 0.3s;
}

table tr:hover {
    background: #f9f9f9;
}

table td {
    color: #666;
}

.action-btns {
    display: flex;
    gap: 10px;
}

.action-btns .btn {
    padding: 8px 15px;
    font-size: 13px;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 10px rgba(30, 60, 114, 0.2);
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.filters select:focus {
    outline: none;
    border-color: #1e3c72;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #1e3c72;
    font-size: 24px;
}

.close-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #d32f2f;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-row input, 
.form-row select, 
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-row input:focus, 
.form-row select:focus, 
.form-row textarea:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 10px rgba(30, 60, 114, 0.2);
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
}

/* Status Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.badge-success {
    background: #4caf50;
    color: white;
}

.badge-warning {
    background: #ff9800;
    color: white;
}

.badge-danger {
    background: #f44336;
    color: white;
}

.badge-info {
    background: #2196f3;
    color: white;
}

/* Leave Request Item */
.leave-item {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #1e3c72;
    transition: all 0.3s;
}

.leave-item:hover {
    background: #e8e8e8;
    transform: translateX(5px);
}

.leave-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.leave-item p {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.leave-item .leave-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Announcement Item */
.announcement-item {
    background: #fff3cd;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #ffc107;
}

.announcement-item h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 16px;
}

.announcement-item p {
    color: #856404;
    font-size: 14px;
    margin: 5px 0;
}

.announcement-item small {
    color: #999;
    font-size: 12px;
}

/* Activity Item */
.activity-item {
    padding: 15px;
    margin: 10px 0;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    transition: all 0.3s;
}

.activity-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.activity-item strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.activity-item p {
    color: #666;
    font-size: 13px;
}

/* Report Section */
.report-section {
    margin: 20px 0;
}

.report-section h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.report-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .header-right {
        text-align: center;
        margin-top: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
    }

    table {
        font-size: 12px;
    }

    table th, table td {
        padding: 10px;
    }

    .action-btns {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .report-buttons {
        flex-direction: column;
    }

    .report-buttons .btn {
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #1e3c72;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a5298;
}

/* Print Styles */
@media print {
    .header, .nav-tabs, .logout-btn, .btn, .search-box {
        display: none !important;
    }

    body {
        background: white;
        padding: 0;
    }

    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}