/* 
 * Google Material Design 3 (Material You) Inspired Styles
 * Yeets Dashboard - Designed to match Google's design language
 */

/* ===== MD3 Design Tokens ===== */
:root {
    /* Primary colors - Google Blue */
    --md-primary: #1a73e8;
    --md-primary-hover: #1557b0;
    --md-primary-container: #d3e3fd;
    --md-on-primary: #ffffff;
    --md-on-primary-container: #041e49;
    
    /* Secondary colors */
    --md-secondary: #5f6368;
    --md-secondary-container: #e8eaed;
    --md-on-secondary: #ffffff;
    --md-on-secondary-container: #1f1f1f;
    
    /* Tertiary - Google Green */
    --md-tertiary: #1e8e3e;
    --md-tertiary-container: #ceead6;
    --md-on-tertiary: #ffffff;
    
    /* Error colors */
    --md-error: #d93025;
    --md-error-container: #fce8e6;
    --md-on-error: #ffffff;
    
    /* Warning colors */
    --md-warning: #f9ab00;
    --md-warning-container: #fef7e0;
    
    /* Surface colors - Light mode */
    --md-surface: #ffffff;
    --md-surface-dim: #f8f9fa;
    --md-surface-bright: #ffffff;
    --md-surface-container-lowest: #ffffff;
    --md-surface-container-low: #f8f9fa;
    --md-surface-container: #f1f3f4;
    --md-surface-container-high: #e8eaed;
    --md-surface-container-highest: #dadce0;
    
    /* On surface */
    --md-on-surface: #202124;
    --md-on-surface-variant: #5f6368;
    
    /* Outline */
    --md-outline: #dadce0;
    --md-outline-variant: #e8eaed;
    
    /* Background */
    --md-background: #ffffff;
    --md-on-background: #202124;
    
    /* Inverse */
    --md-inverse-surface: #303134;
    --md-inverse-on-surface: #f1f3f4;
    --md-inverse-primary: #a8c7fa;
    
    /* Shadow */
    --md-shadow: rgba(60, 64, 67, 0.15);
    --md-shadow-strong: rgba(60, 64, 67, 0.3);
    
    /* Typography */
    --md-font-family: 'Google Sans', 'Product Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --md-font-family-text: 'Google Sans Text', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    
    /* Shape */
    --md-shape-corner-none: 0px;
    --md-shape-corner-extra-small: 4px;
    --md-shape-corner-small: 8px;
    --md-shape-corner-medium: 12px;
    --md-shape-corner-large: 16px;
    --md-shape-corner-extra-large: 28px;
    --md-shape-corner-full: 9999px;
    
    /* Motion */
    --md-motion-duration-short1: 50ms;
    --md-motion-duration-short2: 100ms;
    --md-motion-duration-short3: 150ms;
    --md-motion-duration-short4: 200ms;
    --md-motion-duration-medium1: 250ms;
    --md-motion-duration-medium2: 300ms;
    --md-motion-duration-medium3: 350ms;
    --md-motion-duration-medium4: 400ms;
    --md-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
    --md-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
    --md-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
    --md-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
    
    /* Elevation */
    --md-elevation-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --md-elevation-2: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    --md-elevation-3: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    --md-elevation-4: 0 2px 3px 0 rgba(60, 64, 67, 0.3), 0 6px 10px 4px rgba(60, 64, 67, 0.15);
    --md-elevation-5: 0 4px 4px 0 rgba(60, 64, 67, 0.3), 0 8px 12px 6px rgba(60, 64, 67, 0.15);
    
    /* Sidebar width */
    --sidebar-width: 280px;
}

/* ===== Base Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--md-font-family-text);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--md-on-surface);
    background: var(--md-surface-dim);
    min-height: 100vh;
}

/* ===== Typography - Google Style ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--md-font-family);
    font-weight: 400;
    color: var(--md-on-surface);
    letter-spacing: 0;
}

/* Display */
.md-display-large {
    font-size: 3.5625rem;
    line-height: 4rem;
    letter-spacing: -0.25px;
}

.md-display-medium {
    font-size: 2.8125rem;
    line-height: 3.25rem;
}

.md-display-small {
    font-size: 2.25rem;
    line-height: 2.75rem;
}

/* Headline */
.md-headline-large, h1 {
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 400;
}

.md-headline-medium, h2 {
    font-size: 1.75rem;
    line-height: 2.25rem;
    font-weight: 400;
}

.md-headline-small, h3 {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 400;
}

/* Title */
.md-title-large, h4 {
    font-size: 1.375rem;
    line-height: 1.75rem;
    font-weight: 500;
}

.md-title-medium, h5 {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.15px;
}

.md-title-small, h6 {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.1px;
}

/* Body */
.md-body-large {
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0.5px;
}

.md-body-medium {
    font-size: 0.875rem;
    line-height: 1.25rem;
    letter-spacing: 0.25px;
}

.md-body-small {
    font-size: 0.75rem;
    line-height: 1rem;
    letter-spacing: 0.4px;
}

/* Label */
.md-label-large {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.md-label-medium {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.md-label-small {
    font-size: 0.6875rem;
    line-height: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== Links ===== */
a {
    color: var(--md-primary);
    text-decoration: none;
    transition: color var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

a:hover {
    color: var(--md-primary-hover);
}

a:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
    border-radius: var(--md-shape-corner-extra-small);
}

/* ===== App Layout - Google Admin Style ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Navigation Rail / Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--md-surface);
    border-right: 1px solid var(--md-outline-variant);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized);
}

.sidebar-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    height: 64px;
    border-bottom: 1px solid var(--md-outline-variant);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--md-font-family);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--md-on-surface);
    text-decoration: none;
}

.sidebar-logo:hover {
    color: var(--md-on-surface);
}

.sidebar-logo svg,
.sidebar-logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--md-shape-corner-small);
}

.sidebar-nav {
    flex: 1;
    padding: 8px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--md-outline) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--md-outline);
    border-radius: var(--md-shape-corner-full);
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--md-on-surface-variant);
    padding: 16px 16px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 48px;
    border-radius: var(--md-shape-corner-full);
    color: var(--md-on-surface-variant);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1px;
    text-decoration: none;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.nav-link:hover {
    color: var(--md-on-surface);
}

.nav-link:hover::before {
    opacity: 0.08;
}

.nav-link:active::before {
    opacity: 0.12;
}

.nav-link.active {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}

.nav-link.active::before {
    display: none;
}

.nav-link svg,
.nav-link .material-icons {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--md-outline-variant);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--md-shape-corner-full);
    cursor: pointer;
    transition: background var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.user-menu:hover {
    background: var(--md-surface-container);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--md-shape-corner-full);
    background: var(--md-primary);
    color: var(--md-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--md-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--md-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Main Content Area ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--md-surface-dim);
}

.top-bar {
    background: var(--md-surface);
    border-bottom: 1px solid var(--md-outline-variant);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-family: var(--md-font-family);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--md-on-surface);
}

.page-content {
    flex: 1;
    padding: 24px;
    max-width: 1600px;
}

/* ===== Cards - Google Style ===== */
.card {
    background: var(--md-surface);
    border-radius: var(--md-shape-corner-large);
    border: 1px solid var(--md-outline-variant);
    overflow: hidden;
    transition: box-shadow var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.card:hover {
    box-shadow: var(--md-elevation-1);
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--md-outline-variant);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--md-font-family);
    font-size: 1rem;
    font-weight: 500;
    color: var(--md-on-surface);
    letter-spacing: 0.15px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--md-outline-variant);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== Stat Cards - Google Analytics Style ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-corner-large);
    padding: 24px;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.stat-card:hover {
    box-shadow: var(--md-elevation-1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--md-shape-corner-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.primary {
    background: var(--md-primary-container);
    color: var(--md-primary);
}

.stat-icon.success {
    background: var(--md-tertiary-container);
    color: var(--md-tertiary);
}

.stat-icon.warning {
    background: var(--md-warning-container);
    color: #e37400;
}

.stat-icon.danger {
    background: var(--md-error-container);
    color: var(--md-error);
}

.stat-value {
    font-family: var(--md-font-family);
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--md-on-surface);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--md-on-surface-variant);
    letter-spacing: 0.25px;
}

/* ===== Buttons - MD3 Style ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 24px;
    border: none;
    border-radius: var(--md-shape-corner-full);
    font-family: var(--md-font-family);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.btn:hover::before {
    opacity: 0.08;
}

.btn:active::before {
    opacity: 0.12;
}

.btn:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* Filled button */
.btn-primary {
    background: var(--md-primary);
    color: var(--md-on-primary);
}

.btn-primary:hover {
    box-shadow: var(--md-elevation-1);
}

/* Outlined button */
.btn-outline {
    background: transparent;
    color: var(--md-primary);
    border: 1px solid var(--md-outline);
}

.btn-outline:hover {
    background: var(--md-primary-container);
    border-color: var(--md-primary-container);
}

/* Text button */
.btn-secondary {
    background: transparent;
    color: var(--md-primary);
    padding: 0 12px;
}

/* Tonal button */
.btn-tonal {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}

/* Danger button */
.btn-danger {
    background: var(--md-error);
    color: var(--md-on-error);
}

.btn-danger:hover {
    box-shadow: var(--md-elevation-1);
}

/* Button sizes */
.btn-sm {
    min-height: 32px;
    padding: 0 16px;
    font-size: 0.8125rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--md-shape-corner-full);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* ===== Form Elements - Google Style ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: var(--md-on-surface-variant);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 56px;
    padding: 16px;
    background: var(--md-surface);
    border: 1px solid var(--md-outline);
    border-radius: var(--md-shape-corner-extra-small);
    font-family: var(--md-font-family-text);
    font-size: 1rem;
    color: var(--md-on-surface);
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.form-input:hover {
    border-color: var(--md-on-surface);
}

.form-input:focus {
    outline: none;
    border-color: var(--md-primary);
    border-width: 2px;
    padding: 15px;
}

.form-input::placeholder {
    color: var(--md-on-surface-variant);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--md-on-surface-variant);
    margin-top: 4px;
    letter-spacing: 0.4px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--md-error);
    margin-top: 4px;
    letter-spacing: 0.4px;
}

/* ===== Tables - Google Style ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--md-shape-corner-medium);
}

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

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--md-outline-variant);
}

.table th {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--md-on-surface-variant);
    background: var(--md-surface-container-low);
    text-transform: uppercase;
}

.table tbody tr {
    transition: background var(--md-motion-duration-short2) var(--md-motion-easing-standard);
}

.table tbody tr:hover {
    background: var(--md-surface-container-low);
}

/* ===== Badges / Chips - MD3 Style ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 12px;
    border-radius: var(--md-shape-corner-full);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--md-tertiary-container);
    color: #0d652d;
}

.badge-warning {
    background: var(--md-warning-container);
    color: #9a6700;
}

.badge-danger {
    background: var(--md-error-container);
    color: var(--md-error);
}

.badge-secondary {
    background: var(--md-surface-container-high);
    color: var(--md-on-surface-variant);
}

/* ===== Toggle Switch - MD3 Style ===== */
.toggle {
    position: relative;
    width: 52px;
    height: 32px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--md-surface-container-highest);
    border: 2px solid var(--md-outline);
    border-radius: var(--md-shape-corner-full);
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--md-outline);
    border-radius: var(--md-shape-corner-full);
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-emphasized);
}

.toggle input:checked + .toggle-slider {
    background: var(--md-primary);
    border-color: var(--md-primary);
}

.toggle input:checked + .toggle-slider::before {
    width: 24px;
    height: 24px;
    left: 22px;
    background: var(--md-on-primary);
}

/* ===== Modal / Dialog - MD3 Style ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--md-motion-duration-short4) var(--md-motion-easing-standard);
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--md-surface-container-high);
    border-radius: var(--md-shape-corner-extra-large);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: all var(--md-motion-duration-medium2) var(--md-motion-easing-emphasized-decelerate);
    box-shadow: var(--md-elevation-3);
}

.modal-overlay.active .modal {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: 24px 24px 0;
}

.modal-title {
    font-family: var(--md-font-family);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--md-on-surface);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--md-shape-corner-full);
    color: var(--md-on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.modal-close:hover {
    background: var(--md-surface-container-highest);
}

.modal-body {
    padding: 16px 24px 24px;
    overflow-y: auto;
    color: var(--md-on-surface-variant);
    font-size: 0.875rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== Snackbar / Toast - MD3 Style ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.toast {
    background: var(--md-inverse-surface);
    color: var(--md-inverse-on-surface);
    border-radius: var(--md-shape-corner-extra-small);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 288px;
    max-width: 568px;
    box-shadow: var(--md-elevation-3);
    animation: snackbarSlide 0.3s var(--md-motion-easing-emphasized-decelerate);
}

@keyframes snackbarSlide {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success svg { color: var(--md-tertiary); }
.toast.error svg { color: var(--md-error); }
.toast.warning svg { color: var(--md-warning); }

.toast-action {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--md-inverse-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0 8px;
}

/* ===== Progress Indicator - MD3 Style ===== */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--md-surface-container-highest);
    border-top-color: var(--md-primary);
    border-radius: var(--md-shape-corner-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress {
    height: 4px;
    background: var(--md-surface-container-highest);
    border-radius: var(--md-shape-corner-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--md-primary);
    border-radius: var(--md-shape-corner-full);
    transition: width 0.5s var(--md-motion-easing-emphasized);
}

.progress-bar.warning {
    background: var(--md-warning);
}

.progress-bar.danger {
    background: var(--md-error);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    color: var(--md-on-surface-variant);
    opacity: 0.5;
}

.empty-state-title {
    font-family: var(--md-font-family);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--md-on-surface);
    margin-bottom: 8px;
}

.empty-state-description {
    color: var(--md-on-surface-variant);
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Auth Pages - Google Sign-in Style ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--md-surface);
}

.auth-card {
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-corner-large);
    width: 100%;
    max-width: 448px;
    padding: 48px 40px;
    box-shadow: var(--md-elevation-1);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo img,
.auth-logo svg {
    width: 75px;
    height: 75px;
    margin-bottom: 16px;
}

.auth-logo h1 {
    font-family: var(--md-font-family);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--md-on-surface);
}

.auth-title {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title h2 {
    font-family: var(--md-font-family);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--md-on-surface);
    margin-bottom: 8px;
}

.auth-title p {
    color: var(--md-on-surface-variant);
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--md-on-surface-variant);
    font-size: 0.875rem;
}

.auth-footer a {
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--md-on-surface-variant);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--md-outline-variant);
}

/* ===== Checkbox - MD3 Style ===== */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--md-on-surface);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--md-primary);
    cursor: pointer;
}

/* ===== Dropdown Menu - MD3 Style ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--md-surface-container);
    border-radius: var(--md-shape-corner-extra-small);
    min-width: 200px;
    padding: 8px 0;
    box-shadow: var(--md-elevation-2);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transform-origin: top right;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    z-index: 100;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--md-on-surface);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background var(--md-motion-duration-short2) var(--md-motion-easing-standard);
}

.dropdown-item:hover {
    background: var(--md-surface-container-high);
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    color: var(--md-on-surface-variant);
}

.dropdown-item.danger {
    color: var(--md-error);
}

.dropdown-item.danger svg {
    color: var(--md-error);
}

/* ===== Pricing Cards - Google One Style ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.pricing-card {
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-corner-extra-large);
    padding: 32px;
    position: relative;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.pricing-card:hover {
    box-shadow: var(--md-elevation-2);
}

.pricing-card.featured {
    border-color: var(--md-primary);
    border-width: 2px;
}

.pricing-card.featured::before {
    content: "Recommended";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--md-primary);
    color: var(--md-on-primary);
    padding: 4px 16px;
    border-radius: var(--md-shape-corner-full);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.pricing-name {
    font-family: var(--md-font-family);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--md-on-surface);
}

.pricing-price {
    font-family: var(--md-font-family);
    font-size: 3rem;
    font-weight: 400;
    color: var(--md-on-surface);
    margin-bottom: 4px;
}

.pricing-period {
    color: var(--md-on-surface-variant);
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--md-on-surface-variant);
}

.pricing-features li svg {
    width: 20px;
    height: 20px;
    color: var(--md-tertiary);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===== Site Cards ===== */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.site-card {
    background: var(--md-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--md-shape-corner-large);
    padding: 20px;
    cursor: pointer;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.site-card:hover {
    border-color: var(--md-primary);
    box-shadow: var(--md-elevation-1);
}

.site-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.site-favicon {
    width: 40px;
    height: 40px;
    border-radius: var(--md-shape-corner-small);
    background: var(--md-surface-container);
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-favicon img {
    width: 24px;
    height: 24px;
}

.site-name {
    font-family: var(--md-font-family);
    font-weight: 500;
    font-size: 1rem;
    color: var(--md-on-surface);
    word-break: break-all;
}

.site-stats {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--md-on-surface-variant);
}

/* ===== Pattern Input ===== */
.pattern-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--md-surface);
    border: 1px solid var(--md-outline);
    border-radius: var(--md-shape-corner-extra-small);
    min-height: 56px;
    transition: border-color var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.pattern-input-container:focus-within {
    border-color: var(--md-primary);
    border-width: 2px;
    padding: 11px;
}

.pattern-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 4px 0 12px;
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
    border-radius: var(--md-shape-corner-small);
    font-size: 0.875rem;
}

.pattern-tag button {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: var(--md-shape-corner-full);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pattern-tag button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.pattern-input {
    flex: 1;
    min-width: 150px;
    background: transparent;
    border: none;
    color: var(--md-on-surface);
    font-size: 1rem;
    outline: none;
}

/* ===== Loading State ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 640px) {
    :root {
        --sidebar-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 32px 24px;
    }
    
    .modal {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .page-content {
        padding: 16px;
    }
}

/* ===== Utility Classes ===== */
.text-muted {
    color: var(--md-on-surface-variant);
}

.text-primary {
    color: var(--md-primary);
}

.text-success {
    color: var(--md-tertiary);
}

.text-error {
    color: var(--md-error);
}

.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ===== Ripple Effect ===== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.ripple:active::after {
    width: 200%;
    height: 200%;
}

/* ===== FAB - Floating Action Button ===== */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--md-shape-corner-large);
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    box-shadow: var(--md-elevation-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    z-index: 50;
}

.fab:hover {
    box-shadow: var(--md-elevation-4);
}

.fab svg {
    width: 24px;
    height: 24px;
}

/* ===== Divider ===== */
.divider {
    height: 1px;
    background: var(--md-outline-variant);
    margin: 16px 0;
}

/* ===== Info Banner ===== */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--md-primary-container);
    border-radius: var(--md-shape-corner-medium);
    margin-bottom: 24px;
}

.info-banner svg {
    width: 24px;
    height: 24px;
    color: var(--md-primary);
    flex-shrink: 0;
}

.info-banner-content {
    flex: 1;
}

.info-banner-title {
    font-weight: 500;
    color: var(--md-on-primary-container);
    margin-bottom: 4px;
}

.info-banner-text {
    font-size: 0.875rem;
    color: var(--md-on-primary-container);
    opacity: 0.8;
}

/* ===== Google-style Search Box ===== */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 16px;
    background: var(--md-surface-container);
    border-radius: var(--md-shape-corner-full);
    border: none;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.search-box:focus-within {
    background: var(--md-surface);
    box-shadow: var(--md-elevation-2);
}

.search-box svg {
    width: 20px;
    height: 20px;
    color: var(--md-on-surface-variant);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--md-on-surface);
    outline: none;
}

.search-box input::placeholder {
    color: var(--md-on-surface-variant);
}

/* ===== Tabs - Google Style ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--md-outline-variant);
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    background: transparent;
    border: none;
    font-family: var(--md-font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    position: relative;
    transition: color var(--md-motion-duration-short3) var(--md-motion-easing-standard);
}

.tab:hover {
    color: var(--md-primary);
    background: var(--md-primary-container);
}

.tab.active {
    color: var(--md-primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--md-primary);
    border-radius: 3px 3px 0 0;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--md-surface-container) 0%,
        var(--md-surface-container-high) 50%,
        var(--md-surface-container) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--md-shape-corner-small);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--md-shape-corner-full);
}

/* ===== Tooltip ===== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--md-inverse-surface);
    color: var(--md-inverse-on-surface);
    font-size: 0.75rem;
    border-radius: var(--md-shape-corner-extra-small);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--md-motion-duration-short3) var(--md-motion-easing-standard);
    z-index: 1000;
}

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

/* ===== Avatar Group ===== */
.avatar-group {
    display: flex;
}

.avatar-group .user-avatar {
    margin-left: -8px;
    border: 2px solid var(--md-surface);
}

.avatar-group .user-avatar:first-child {
    margin-left: 0;
}

/* ===== Status Dot ===== */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--md-shape-corner-full);
    margin-right: 8px;
}

.status-dot.online {
    background: var(--md-tertiary);
}

.status-dot.offline {
    background: var(--md-outline);
}

.status-dot.busy {
    background: var(--md-error);
}

/* ===== Google Product Icons ===== */
.product-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--md-shape-corner-full);
    background: var(--md-surface-container);
}

.product-icon img,
.product-icon svg {
    width: 24px;
    height: 24px;
}
