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

:root {
    --bg-color: #fafafa;
    --surface-color: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --accent-primary: #1a73e8;
    /* Google blue */
    --accent-hover: #174ea6;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4 {
    font-weight: 500;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Forms */
.input-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

.flash-messages {
    margin-bottom: 24px;
}

.flash {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 12px;
    border: 1px solid #fce8e6;
    background: #fce8e6;
    color: #c5221f;
}

/* Login */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-sm);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

/* Top Navbar */
.top-nav {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(26, 115, 232, 0.08);
}

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

.nav-user {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.logout-btn:hover {
    color: #d93025;
    /* Red for logout */
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 48px 24px;
    height: 100%;
    margin-right: 0 !important;
}

/* Custom Table Row Styles */
.table-row {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table-row:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-row:hover {
    background-color: #e8f0fe !important;
    /* Google light blue hover */
    cursor: default;
}

.content-header {
    margin-bottom: 32px;
}

.content-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.content-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.workspace-area {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 64px 40px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.workspace-area .icon {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    opacity: 0.5;
}

.workspace-area h3 {
    margin-bottom: 12px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(26, 115, 232, 0.2);
    border-top: 5px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

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

.loading-text {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
    }
}