/* Shared Base CSS for Management System */
:root {
    --primary-color: #006B3C;
    --secondary-color: #00445E;
    --bg-color: #F1F5F9;
    --text-dark: #1E293B;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.bi {
    vertical-align: -0.125em;
    fill: currentColor;
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary { background: var(--primary-color); color: #FFFFFF; }
.btn-primary:hover { background: #004d2b; }

.btn-secondary { background: var(--secondary-color); color: #FFFFFF; }
.btn-secondary:hover { background: #002d3e; }

.btn-danger { background: #DC2626; color: #FFFFFF; }
.btn-danger:hover { background: #B91C1C; }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }

.alert {
    padding: 0.85rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.alert-danger { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #FFFFFF;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

.modal-header h3 { margin: 0; font-size: 1.2rem; color: var(--secondary-color); }

.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748B; }

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-group.full-width { grid-column: span 2; }

.form-group label { font-size: 0.85rem; font-weight: 600; color: #475569; }

.form-control {
    padding: 0.65rem 0.85rem;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

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

/* Button Loading & Action Feedback Styles */
.btn-spinner {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    margin-right: 0.35rem;
    vertical-align: -0.1em;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn.is-loading,
.btn[aria-busy="true"] {
    opacity: 0.85;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.btn-success-state {
    background-color: #166534 !important;
    color: #FFFFFF !important;
}

.inline-action-error {
    color: #DC2626;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Staggered Content Entrance Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item {
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--stagger-index, 0) * 40ms);
}

@media (prefers-reduced-motion: reduce) {
    .stagger-item {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
    }
    .btn-spinner {
        animation: none;
        border-style: dotted;
    }
}

/* Full Page Global Preloader Overlay */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #FFFFFF;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    visibility: visible;
}

.page-loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* Rotating Circle Spinner (Green & White Only) */
.rotating-circle-spinner {
    width: 54px;
    height: 54px;
    border: 4px solid #E2E8F0;
    border-top: 4px solid #006B3C;
    border-radius: 50%;
    animation: spinCircle 0.75s linear infinite;
    margin-bottom: 1.2rem;
}

.loader-text {
    color: #00445E;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.loader-subtext {
    color: #64748B;
    font-size: 0.82rem;
    font-weight: 400;
}

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



