/* ========================================
   Bluebonnet Admin Portal - Shared Styles
   ======================================== */

/* ========== CSS Variables (Brand Colors) ========== */
:root {
    /* Primary Brand Colors */
    --primary-blue: #130e36;
    --secondary-purple: #423e5e;

    /* Status Colors */
    --success-green: #28a745;
    --error-red: #e74c3c;
    --warning-orange: #e67e22;

    /* Neutral Colors */
    --bg-light: #f9f9f9;
    --border-grey: #ddd;
    --text-dark: #333;
    --text-medium: #666;
}

/* ========== Base Reset ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
}

/* ========== Header ========== */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 15px 25px;
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header> :first-child {
    justify-self: start;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    white-space: nowrap;
}

.header .header-buttons {
    justify-self: end;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

/* ========== Buttons ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary:hover {
    background: #e8e8e8;
}

/* Transparent style - standard for header buttons */
.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-danger {
    background: var(--error-red);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* ========== Modal Overlay ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

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

.modal {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.small {
    max-width: 400px;
}

.modal-header {
    background: var(--primary-blue);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.modal-footer {
    padding: 15px 20px;
    background: #f5f5f5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer.center {
    justify-content: center;
}

/* ========== Loading Spinner ========== */
.spinner {
    width: 30px;
    height: 30px;
    margin: 30px auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* ========== Utility Classes ========== */
.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 30px 15px;
    color: var(--text-medium);
    font-size: 14px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .header {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .header> :first-child,
    .header .header-buttons {
        justify-self: center;
    }

    .header h1 {
        font-size: 18px;
    }

    .header-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}