/* BMGOne Payroll Portal Styles - Deployment Ready */

:root {
    --primary-teal: #00a8cc;
    --primary-blue: #0078d4;
    --light-teal: #e0f7fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --gradient-primary: linear-gradient(135deg, #00a8cc 0%, #0078d4 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8fafc;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-teal);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 168, 204, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-teal);
}

.btn-staff-login {
    background: var(--gradient-secondary);
    color: white;
    padding: 10px 25px;
    font-size: 0.9rem;
}

.btn-staff-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Login Form Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.login-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.login-header img {
    width: 150px;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-body {
    padding: 2rem;
}

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

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.login-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    color: #1f2937;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

.login-form input::placeholder {
    color: #9ca3af;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-teal);
}

.btn-login {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 168, 204, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 204, 0.4);
}

/* Dashboard Styles */
.payroll-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    display: none;
}

.payroll-container.show {
    display: block;
}

.dashboard-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 168, 204, 0.3);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-teal);
    font-weight: bold;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-teal);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Attendance Styles */
.attendance-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-attendance {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login-attendance {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-login-attendance:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-login-attendance:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-logout-attendance {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-logout-attendance:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-logout-attendance:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.attendance-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: #f9fafb;
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.status-label {
    font-weight: 600;
    color: var(--text-dark);
}

.status-value {
    color: var(--primary-teal);
}

/* Leave Balance Styles */
.leave-balance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.leave-type-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--light-teal);
    border-radius: 10px;
}

.leave-type-name {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.leave-days-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-teal);
}

.leave-days-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: #1f2937;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-teal);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 204, 0.3);
}

/* Holiday List Styles */
.holiday-list {
    max-height: 400px;
    overflow-y: auto;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.holiday-item:hover {
    background-color: #f9fafb;
}

.holiday-date {
    font-weight: 600;
    color: var(--primary-teal);
    min-width: 100px;
}

.holiday-name {
    flex: 1;
    margin: 0 1rem;
}

.holiday-type {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.type-gazetted {
    background: #dcfce7;
    color: #16a34a;
}

.type-restricted {
    background: #fef3c7;
    color: #d97706;
}

.type-optional {
    background: #dbeafe;
    color: #2563eb;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    color: var(--primary-teal);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-light);
}

.warning-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-box p {
    color: #92400e;
    margin: 0;
    font-weight: 600;
}

/* Success Modal */
.success-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.btn-close-modal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* Admin Navigation */
.admin-nav {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.admin-nav a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--light-teal);
    color: var(--primary-teal);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-nav a:hover {
    background: var(--primary-teal);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

    .leave-balance-grid {
        grid-template-columns: 1fr;
    }

    .attendance-buttons {
        flex-direction: column;
    }

    .admin-nav ul {
        flex-direction: column;
    }

    .login-box {
        margin: 1rem;
    }

    .dashboard-header {
        padding: 1.5rem;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Spinner */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .navbar,
    .admin-nav,
    .btn,
    .attendance-buttons,
    .form-group {
        display: none !important;
    }

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

    .dashboard-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}
