/* Google Workspace Color Palette */
:root {
    --google-blue: #4285f4;
    --google-red: #ea4335;
    --google-yellow: #fbbc04;
    --google-green: #34a853;
    --bg-color: #f8f9fa;
    --sidebar-bg: #ffffff;
    --border-color: #e0e0e0;
    --text-primary: #202124;
    --text-secondary: #5f6368;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container h2 {
    margin-top: 15px;
    color: var(--text-primary);
    font-weight: 400;
}

.form-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--google-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.btn-primary {
    background-color: var(--google-blue);
    border: none;
    padding: 12px;
    font-weight: 500;
    border-radius: 4px;
}

.btn-primary:hover {
    background-color: #3367d6;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header svg {
    width: 40px;
    height: 40px;
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.nav-item {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: #f1f3f4;
    color: var(--text-primary);
}

.nav-item.active {
    background-color: #e8f0fe;
    color: var(--google-blue);
    border-left-color: var(--google-blue);
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--google-blue), var(--google-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.topbar {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: none;
    margin-bottom: 20px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-left: 4px solid;
}

.stat-card.blue { border-left-color: var(--google-blue); }
.stat-card.red { border-left-color: var(--google-red); }
.stat-card.yellow { border-left-color: var(--google-yellow); }
.stat-card.green { border-left-color: var(--google-green); }

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 400;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-google-blue:hover {
    background-color: #3367d6;
}

.btn-google-green {
    background-color: var(--google-green);
    color: white;
}

.btn-google-green:hover {
    background-color: #2d8e47;
}

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

.btn-google-red:hover {
    background-color: #d33426;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: #f1f3f4;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: #f8f9fa;
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

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

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

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Budget Display */
.budget-summary {
    background: linear-gradient(135deg, var(--google-blue), var(--google-green));
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.budget-amount {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 10px;
}

.budget-label {
    font-size: 16px;
    opacity: 0.9;
}

/* Spreadsheet iframe */
.sheet-iframe-container {
    width: 100%;
    height: calc(100vh - 200px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.sheet-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Utility Classes */
.text-secondary {
    color: var(--text-secondary);
}

.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }

.w-100 { width: 100%; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 10px; }
