/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #FFB347;
    /* Cheese Orange */
    --secondary: #FFCC33;
    /* Lighter Cheese */
    --accent: #FF4500;
    /* Orange Red for buttons */
    --dark-bg: #1a1a1a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f0f0f0;
    --text-secondary: #aaaaaa;
    --success: #28a745;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background: radial-gradient(circle at top right, #2a2a2a, #1a1a1a);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Typography */
h1,
h2,
h3 {
    margin-top: 0;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-secondary {
    color: var(--text-secondary);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: rgb(52, 52, 52);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

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

/* Forms */
input,
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
}

label {
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-top: 1rem;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Utilities */
.flex {
    display: flex;
    gap: 1rem;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-open {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.badge-closed {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* --- ANIMATIONS & MODALS (FIXED) --- */

/* Blink Animation for Name */
@keyframes blink-red {
    0% {
        color: #ff4444;
        opacity: 1;
        text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
    }

    100% {
        color: #ff8888;
        opacity: 0.8;
        text-shadow: 0 0 15px rgba(255, 68, 68, 0.8);
    }
}

.blink-name {
    animation: blink-red 0.8s infinite alternate;
    color: #ff4444 !important;
}

/* Sticky Header Pulse */
@keyframes pulse-header {
    0% {
        background-color: rgba(30, 30, 30, 0.95);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-bottom-color: var(--glass-border);
    }

    50% {
        background-color: rgba(60, 45, 30, 0.98);
        box-shadow: 0 0 25px rgba(255, 179, 71, 0.4);
        border-bottom-color: var(--primary);
    }

    100% {
        background-color: rgba(30, 30, 30, 0.95);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-bottom-color: var(--glass-border);
    }
}

.header-highlight {
    animation: pulse-header 1.5s ease-in-out infinite !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    /* Standard Max Int */
}

.modal-content {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    max-width: 500px;
    width: 90%;
    color: #fff;
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}