:root {
    color-scheme: light dark;
    font-family: "Segoe UI", Roboto, sans-serif;
    background-color: #f6f7fb;
    color: #1a1a1a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 2rem 3rem 1rem;
    background: linear-gradient(135deg, #1b74ff, #00a99d);
    color: #fff;
}

header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

header h1 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
}

header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.85;
}

main {
    flex: 1;
    padding: 2rem 3rem;
    display: grid;
    gap: 2rem;
}

.card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.card-header p {
    margin-top: 0.35rem;
    color: #4b5563;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: #1f2937;
    gap: 0.35rem;
}

label input,
label textarea {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
    color: inherit;
}

label textarea {
    resize: vertical;
    min-height: 90px;
}

label input:focus,
label textarea:focus {
    outline: none;
    border-color: #1b74ff;
    box-shadow: 0 0 0 3px rgba(27, 116, 255, 0.2);
}

.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1.9rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
}

.actions button {
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.3rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.actions button.primary {
    background: linear-gradient(135deg, #1b74ff, #00a99d);
    color: #fff;
    box-shadow: 0 12px 20px rgba(27, 116, 255, 0.25);
}

.actions button.secondary {
    background: #e5e7eb;
    color: #1f2937;
}

.actions button.danger {
    background: #f87171;
    color: #fff;
}

.actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.actions button:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: #f3f4f6;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

thead th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    color: #4b5563;
}

tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    vertical-align: middle;
}

tbody tr:nth-child(even) {
    background: #f9fafb;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.badge.warning {
    background: rgba(248, 113, 113, 0.15);
    color: #b91c1c;
}

.muted {
    display: block;
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.3rem;
    word-break: break-word;
}

td .row-actions {
    display: flex;
    gap: 0.5rem;
}

.thumb {
    display: inline-block;
    max-width: 140px;
    max-height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #d1d5db;
}

.status {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    display: none;
}

.status.info {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.status.success {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.status.error {
    background: rgba(248, 113, 113, 0.15);
    color: #b91c1c;
}

.status.visible {
    display: block;
}

.hidden {
    display: none !important;
}

footer {
    padding: 1rem 3rem;
    background: #0f172a;
    color: #cbd5f5;
    font-size: 0.9rem;
}

.logout {
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    color: #1b74ff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 100;
}

.overlay.hidden {
    display: none !important;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    width: min(360px, 90%);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
}

.login-card h2 {
    margin: 0;
    font-size: 1.6rem;
    color: #1f2937;
}

.login-card .muted {
    margin: 0;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-card button.primary {
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: #fff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-login-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.google-login-btn:active {
    transform: translateY(0);
}

.google-login-btn svg {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    header,
    main,
    footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    table {
        min-width: 100%;
    }
}
