:root {
    --primary: #1a73e8;
    --primary-hover: #1765cc;
    --secondary: #34a853;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #202124;
    --text-muted: #5f6368;
    --border: #dadce0;
    --hover: rgba(26, 115, 232, 0.04);
}

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

body {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
aside {
    width: 260px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    margin-bottom: 0.5rem;
}

nav ul {
    list-style: none;
}

nav li {
    margin-bottom: 0.25rem;
}

nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0 0.5rem 0.5rem 0;
    transition: all 0.2s;
}

nav a:hover,
nav a.active {
    background: var(--hover);
    color: var(--primary);
    font-weight: 500;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.875rem;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.1);
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
    border-color: var(--primary);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-main);
}

.stat-card .trend {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 0.5rem;
}

/* Table Section */
.content-section {
    background: var(--card-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.1);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: rgba(52, 168, 83, 0.1);
    color: var(--secondary);
}

.status-pending {
    background: rgba(255, 186, 0, 0.1);
    color: #ffb600;
}

/* Micro-animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeIn 0.3s ease forwards;
}

/* Calendar View */
.calendar-table {
    border-spacing: 0;
    border-collapse: separate;
}

.calendar-table tr {
    transition: 0.2s;
}

.calendar-table tr:hover {
    background: var(--hover);
}

.calendar-table td {
    border-bottom: none;
    padding: 1rem;
    vertical-align: middle;
}

.calendar-table td:first-child {
    border-left: 3px solid var(--primary);
}

.media-preview-small {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: inline-block;
    vertical-align: middle;
    background: #eee;
    transition: transform 0.2s;
}

.media-preview-small:hover {
    transform: scale(3.5);
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.media-preview-small img,
.media-preview-small video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Search and Input Styles */
.search-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.875rem;
}

.search-box svg {
    color: var(--text-muted);
    width: 1rem;
    height: 1rem;
}

/* Card Header Actions */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--hover);
    color: var(--text-main);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--hover);
    color: var(--text-main);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--text-main);
    color: var(--card-bg);
    text-align: center;
    border-radius: 0.25rem;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    white-space: nowrap;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    color: var(--border);
    margin-bottom: 1rem;
}

/* Loading Spinner */
.loader {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    aside {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    main {
        padding: 1.5rem;
    }

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