/* === ITF Color Palette === */
:root {
    --yellow: #F5C500;
    --green: #2E9B38;
    --blue: #1D62B5;
    --red: #CC2828;
    --black: #1A1A1A;
    --white: #FFFFFF;
    --yellow-tint: #FDF6E3;
    --green-tint: #E8F4EE;
    --blue-tint: #E8EEF8;
    --red-tint: #F8EAEA;
    --grey-tint: #EBEBEB;
    --green-hover: #247a2d;
    --blue-hover: #154d8f;
    --red-hover: #a32020;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--black);
    background: var(--white);
    line-height: 1.5;
}

/* === Login Page === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--yellow-tint) 0%, var(--green-tint) 30%, var(--blue-tint) 65%, var(--red-tint) 100%);
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card .logo { max-width: 220px; margin-bottom: 24px; }

.login-card h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--black);
}

/* === Forms === */
.form-group { margin-bottom: 16px; text-align: left; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--black);
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--grey-tint);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29,98,181,0.12);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    width: 100%;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover:not(:disabled) { background: var(--green-hover); }

.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover:not(:disabled) { background: var(--blue-hover); }

.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover:not(:disabled) { background: var(--red-hover); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--grey-tint);
    color: var(--black);
}
.btn-outline:hover:not(:disabled) { background: var(--grey-tint); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; width: auto; }

.link-btn {
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    margin-top: 12px;
}
.link-btn:hover { color: var(--blue-hover); }

/* === Alerts === */
.alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
}
.alert.show { display: block; }
.alert-error { background: var(--red-tint); color: var(--red); border: 1px solid var(--red); }
.alert-success { background: var(--green-tint); color: var(--green); border: 1px solid var(--green); }

/* === Dashboard Layout === */
.dashboard { min-height: 100vh; display: flex; flex-direction: column; }

.navbar {
    background: var(--black);
    color: var(--white);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar .nav-left { display: flex; align-items: center; gap: 12px; }
.navbar .nav-left img { height: 32px; }
.navbar .nav-left span { font-weight: 600; font-size: 1rem; }

.navbar .nav-right { display: flex; align-items: center; gap: 16px; }

.navbar .user-name {
    font-size: 0.85rem;
    color: var(--grey-tint);
}

.navbar .btn-logout {
    background: var(--red);
    color: var(--white);
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.navbar .btn-logout:hover { background: var(--red-hover); }

/* === Main Content === */
.main-content {
    flex: 1;
    padding: 24px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

/* === Tabs === */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--grey-tint);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover { color: var(--black); }

.tab-btn.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* === Cards === */
.card {
    background: var(--white);
    border: 1px solid var(--grey-tint);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue-tint);
}

.card .form-actions {
    margin-top: 20px;
    display: flex;
    gap: 8px;
}

/* === Notifications Form === */
.notification-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--grey-tint);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s;
}

.notification-form textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29,98,181,0.12);
}

/* === Notification Table === */
.notif-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.notif-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--grey-tint);
    font-weight: 600;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.notif-table td {
    padding: 10px;
    border-bottom: 1px solid var(--grey-tint);
    vertical-align: middle;
}

.notif-table tbody tr:hover { background: var(--blue-tint); }

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-PENDING { background: var(--yellow-tint); color: #9a7b00; }
.status-PROCESSING { background: var(--blue-tint); color: var(--blue); }
.status-COMPLETED { background: var(--green-tint); color: var(--green); }
.status-FAILED { background: var(--red-tint); color: var(--red); }
.status-CANCELLED { background: var(--grey-tint); color: #666; }

.btn-delete {
    background: none;
    border: 1px solid var(--red);
    color: var(--red);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-delete:hover {
    background: var(--red);
    color: var(--white);
}

/* === Color stripe (decorative) === */
.color-stripe {
    height: 4px;
    background: linear-gradient(90deg, var(--yellow) 20%, var(--green) 40%, var(--blue) 60%, var(--red) 80%, var(--black) 100%);
}

/* === Spinner === */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Responsive === */
@media (max-width: 600px) {
    .login-card { margin: 16px; padding: 24px; }
    .main-content { padding: 16px; }
    .tabs { overflow-x: auto; }
    .tab-btn { padding: 8px 14px; font-size: 0.8rem; white-space: nowrap; }
}
