/* Notion-inspired styling for dashboard */
:root {
    --notion-bg: #ffffff;
    --notion-text: #37352f;
    --notion-light-gray: #f7f6f3;
    --notion-gray: #ebeaea;
    --notion-light-text: #6b6b6b;
    --notion-sidebar: #fbfbfa;
    --notion-sidebar-hover: #efefef;
    --notion-border: #e0e0e0;
    --notion-accent: #2eaadc;
    --notion-accent-light: #e9f6fb;
    --notion-green: #0f7b6c;
    --notion-green-light: #e2f5f3;
    --notion-yellow: #dfab01;
    --notion-yellow-light: #fbf3db;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--notion-bg);
    color: var(--notion-text);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background: var(--notion-sidebar);
    border-right: 1px solid var(--notion-border);
    padding: 20px 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    min-width: 250px;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--notion-border);
    margin-bottom: 15px;
}

.workspace-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-badge {
    font-size: 11px;
    background-color: var(--notion-accent-light);
    color: var(--notion-accent);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

.sidebar-section {
    margin-bottom: 10px;
    padding: 0 10px;
}

.sidebar-section-title {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--notion-light-text);
    padding: 5px 10px;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.sidebar a {
    color: var(--notion-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 2px;
    font-size: 14px;
    gap: 8px;
}

.sidebar a:hover {
    background: var(--notion-sidebar-hover);
}

.sidebar a.active {
    background: rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

/* Main Content */
.content {
    flex-grow: 1;
    padding: 40px 60px;
    overflow-y: auto;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--notion-text);
}

.page-subtitle {
    font-size: 16px;
    color: var(--notion-light-text);
    margin-bottom: 30px;
}

/* Card Styles */
.notion-card {
    background: var(--notion-bg);
    border: 1px solid var(--notion-border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.notion-card:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title a {
    color: var(--notion-text);
    text-decoration: none;
}

.card-title a:hover {
    text-decoration: underline;
}

.card-value {
    font-size: 28px;
    font-weight: 600;
    margin-top: 10px;
}

/* Widget Cards */
.widgets-container {
    margin-top: 30px;
}

.widget-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.widget-card {
    background: var(--notion-bg);
    border: 1px solid var(--notion-border);
    border-radius: 4px;
    padding: 20px;
    flex: 1;
    transition: box-shadow 0.2s;
}

.widget-card:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.widget-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 8px;
}

.widget-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--notion-text);
}

.widget-icon {
    color: var(--notion-light-text);
}

.widget-content {
    font-size: 28px;
    font-weight: 600;
}

/* Metric Cards Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--notion-bg);
    border: 1px solid var(--notion-border);
    border-radius: 4px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.metric-card:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.metric-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--notion-light-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 600;
}

/* Form Styling */
.form-card {
    background: var(--notion-bg);
    border: 1px solid var(--notion-border);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 30px;
}

.form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--notion-border);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background-color: var(--notion-bg);
    transition: border 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--notion-accent);
}

.file-input-container {
    position: relative;
    margin-bottom: 15px;
}

.file-input-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--notion-light-gray);
    border: 1px solid var(--notion-border);
    color: var(--notion-text);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.file-input-button:hover {
    background: var(--notion-gray);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-name {
    margin-top: 8px;
    font-size: 14px;
    color: var(--notion-light-text);
}

.notion-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--notion-accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.notion-button:hover {
    background: #2196c4;
}

.button-secondary {
    background: var(--notion-light-gray);
    color: var(--notion-text);
    border: 1px solid var(--notion-border);
}

.button-secondary:hover {
    background: var(--notion-gray);
}

/* Database Table */
.database-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 14px;
}

.database-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--notion-border);
    color: var(--notion-light-text);
    font-weight: 500;
}

.database-table td {
    padding: 10px;
    border-bottom: 1px solid var(--notion-border);
}

.database-table tr:hover {
    background: var(--notion-light-gray);
}

/* Tags and Pills */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.tag-blue {
    background: #e8f0fe;
    color: #1a73e8;
}

.tag-green {
    background: #e6f4ea;
    color: #137333;
}

.tag-yellow {
    background: #fef7e0;
    color: #b06000;
}

/* Status Messages */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: var(--notion-text);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    max-width: 300px;
}

/* User Menu */
.user-menu {
    margin-top: auto;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--notion-light-text);
    border-top: 1px solid var(--notion-border);
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: var(--notion-accent-light);
    color: var(--notion-accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        min-width: 200px;
    }

    .content {
        padding: 20px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content {
        margin-left: 0;
    }
}