/* ============================================
   UNICORN ECOSYSTEM — GLOBAL DESIGN SYSTEM
   Google Material Design 3 + Brand Tokens
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    /* =========================================
       GOOGLE ECOSYSTEM DESIGN TOKENS
       ========================================= */

    /* CORE BRAND PALETTE */
    --google-blue: #4285F4;
    --google-blue-hover: #3367D6;
    --google-red: #EA4335;
    --google-yellow: #FBBC04;
    --google-green: #34A853;

    /* EXTENDED PALETTE */
    --google-blue-container: #D2E3FC;
    --google-red-container: #FCE8E6;
    --google-yellow-container: #FEF7E0;
    --google-green-container: #E6F4EA;

    /* CORE TEXT COLORS */
    --text-primary: #202124;
    --text-secondary: #5F6368;
    --text-tertiary: #9AA0A6;
    --text-main: #202124;

    /* CORE SURFACES */
    --surface-white: #FFFFFF;
    --surface-grey: #F8F9FA;
    --surface-variant: #F1F3F4;
    --border-color: #DADCE0;

    /* MATERIAL 3 COMPATIBILITY TOKENS */
    --md-sys-color-primary: var(--google-blue);
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: var(--google-blue-container);
    --md-sys-color-on-primary-container: #1A73E8;
    --md-sys-color-secondary: var(--text-secondary);
    --md-sys-color-secondary-container: #E8F0FE;
    --md-sys-color-on-secondary-container: #1967D2;
    --md-sys-color-background: var(--surface-white);
    --md-sys-color-on-background: var(--text-primary);
    --md-sys-color-surface: var(--surface-white);
    --md-sys-color-on-surface: var(--text-primary);
    --md-sys-color-surface-variant: var(--surface-grey);
    --md-sys-color-on-surface-variant: var(--text-secondary);
    --md-sys-color-outline: var(--border-color);
    --md-sys-color-outline-variant: #E8EAED;
    --md-sys-color-error: #D93025;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-inverse-surface: #303134;
    --md-sys-color-inverse-on-surface: #F1F3F4;

    /* MD3 SHAPES */
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;

    /* TYPOGRAPHY */
    --font-brand: 'Google Sans', 'Roboto', 'Arial', sans-serif;
    --font-plain: 'Roboto', 'Arial', sans-serif;

    /* SHAPES */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* ANIMATION */
    --easing-std: cubic-bezier(0.4, 0.0, 0.2, 1);
    --easing-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1);
    --easing-accelerate: cubic-bezier(0.4, 0.0, 1, 1);
}

/* =========================================
   DARK MODE
   ========================================= */
[data-theme="dark"] {
    --text-primary: #E8EAED;
    --text-secondary: #9AA0A6;
    --text-tertiary: #5F6368;
    --text-main: #E8EAED;
    --surface-white: #1F1F1F;
    --surface-grey: #282A2D;
    --surface-variant: #303134;
    --border-color: #3C4043;

    --md-sys-color-background: #1F1F1F;
    --md-sys-color-on-background: #E8EAED;
    --md-sys-color-surface: #1F1F1F;
    --md-sys-color-on-surface: #E8EAED;
    --md-sys-color-surface-variant: #303134;
    --md-sys-color-on-surface-variant: #9AA0A6;
    --md-sys-color-outline: #3C4043;
    --md-sys-color-outline-variant: #3C4043;
    --md-sys-color-primary-container: #1A3A5C;
    --md-sys-color-on-primary-container: #8AB4F8;
    --md-sys-color-secondary-container: #2D333B;
    --md-sys-color-on-secondary-container: #8AB4F8;
    --md-sys-color-inverse-surface: #E8EAED;
    --md-sys-color-inverse-on-surface: #303134;
    --md-sys-color-error: #F28B82;

    --google-blue-container: #1A3A5C;
    --google-red-container: #3C2020;
    --google-yellow-container: #3C3520;
    --google-green-container: #1E3A28;
}

/* =========================================
   BASE RESET & BODY
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-plain);
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   TYPOGRAPHY CLASSES
   ========================================= */
.display-large {
    font-family: var(--font-brand);
    font-size: 57px;
    line-height: 64px;
    letter-spacing: -0.25px;
    font-weight: 400;
}

.headline-large {
    font-family: var(--font-brand);
    font-size: 32px;
    line-height: 40px;
    font-weight: 400;
}

.headline-medium {
    font-family: var(--font-brand);
    font-size: 28px;
    line-height: 36px;
    font-weight: 400;
}

.headline-small {
    font-family: var(--font-brand);
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
}

.title-large {
    font-family: var(--font-brand);
    font-size: 22px;
    line-height: 28px;
    font-weight: 500;
}

.title-medium {
    font-family: var(--font-brand);
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
}

.body-large {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.5px;
}

.body-medium {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
}

.body-small {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.4px;
}

.label-large {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.1px;
    font-weight: 500;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-brand);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.25px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s var(--easing-std), box-shadow 0.2s var(--easing-std), transform 0.1s;
    text-decoration: none;
    line-height: 20px;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--google-blue);
    color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(66, 133, 244, 0.3);
}

.btn-primary:hover {
    background-color: var(--google-blue-hover);
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.4);
}

.btn-secondary {
    background-color: var(--surface-grey);
    color: var(--google-blue);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background-color: #E8EAED;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--google-blue);
}

.btn-outline:hover {
    background-color: rgba(66, 133, 244, 0.04);
    border-color: var(--google-blue);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--google-blue);
}

.btn-ghost:hover {
    background-color: rgba(66, 133, 244, 0.08);
}

.btn-lg {
    height: 48px;
    font-size: 16px;
    padding: 0 32px;
}

.btn-sm {
    height: 28px;
    font-size: 12px;
    padding: 0 12px;
}

.btn-action {
    border-radius: var(--radius-md);
    padding: 8px 16px;
    height: auto;
}

/* =========================================
   CARDS (M3)
   ========================================= */
.card-filled {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 24px;
}

.card-elevated {
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 24px;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.12), 0 1px 2px 0px rgba(0, 0, 0, 0.24);
}

.card-outlined {
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 24px;
}

/* =========================================
   FORM FIELDS (M3 Outlined)
   ========================================= */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-field {
    position: relative;
}

.form-input {
    width: 100%;
    height: 56px;
    padding: 0 16px;
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--radius-sm);
    color: var(--md-sys-color-on-surface);
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    padding: 0 15px;
}

.form-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--md-sys-color-background);
    padding: 0 4px;
    font-size: 16px;
    color: var(--md-sys-color-on-surface-variant);
    transition: all 0.2s ease;
    pointer-events: none;
}

.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
    top: 0;
    font-size: 12px;
    color: var(--md-sys-color-primary);
    transform: translateY(-50%);
}

.form-error {
    color: var(--md-sys-color-error);
    font-size: 12px;
    margin-top: 4px;
    margin-left: 16px;
}

.form-control {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--surface-white);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--google-blue);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.form-control-premium {
    background: var(--surface-grey);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.form-control-premium:focus {
    background: var(--surface-white);
    border-color: var(--google-blue);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

/* =========================================
   LAYOUT: DASHBOARD
   ========================================= */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--md-sys-color-background);
}

.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    min-width: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar {
    width: 280px;
    background-color: var(--md-sys-color-surface);
    border-right: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    flex-direction: column;
    padding: 12px;
    height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    z-index: 50;
    overflow-y: auto;
    transition: transform 0.3s var(--easing-std);
}

.sidebar.surface-1 {
    background-color: var(--md-sys-color-surface);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-pill);
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
}

.nav-link.active,
.nav-link.active-page {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.sidebar-footer {
    border-top: 1px solid var(--md-sys-color-outline-variant);
    padding-top: 12px;
    margin-top: auto;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 49;
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile Hamburger */
.sidebar-toggler {
    display: none !important;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 51;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* =========================================
   ALERT / FLASH MESSAGES
   ========================================= */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeUp 0.3s var(--easing-std);
}

.alert-success {
    background: var(--google-green-container);
    color: #137333;
    border: 1px solid #C4EAD1;
}

.alert-error {
    background: var(--google-red-container);
    color: #C5221F;
    border: 1px solid #F5C6C2;
}

.alert-warning {
    background: var(--google-yellow-container);
    color: #B05A00;
    border: 1px solid #FDE293;
}

.alert-info {
    background: var(--google-blue-container);
    color: #1967D2;
    border: 1px solid #AECBFA;
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background-color: var(--md-sys-color-inverse-surface);
    color: var(--md-sys-color-inverse-on-surface);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    min-width: 288px;
    max-width: 568px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeUp 0.3s var(--easing-std) forwards;
}

/* =========================================
   BADGE & CHIPS
   ========================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.badge-error,
.badge-danger {
    background: var(--md-sys-color-error);
    color: white;
}

.badge-warning {
    background: var(--google-yellow);
    color: #202124;
}

.badge-success {
    background: var(--google-green);
    color: white;
}

.badge-primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.badge-light {
    background: var(--surface-grey);
    color: var(--text-secondary);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-plain);
}

.filter-chip:hover {
    background: var(--surface-grey);
}

.filter-chip.active {
    background: var(--google-blue-container);
    color: var(--google-blue);
    border-color: var(--google-blue);
}

/* =========================================
   TABLE
   ========================================= */
.table-responsive,
.table-container {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
}

table th {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td,
table th {
    padding: 12px 16px;
    text-align: left;
}

table tbody tr {
    border-bottom: 1px solid var(--surface-grey);
    transition: background 0.15s;
}

table tbody tr:hover {
    background: rgba(66, 133, 244, 0.04);
}

/* =========================================
   AVATAR
   ========================================= */
.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: var(--google-blue);
}

.avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.icon-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--google-blue-container);
    color: var(--google-blue);
}

.icon-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-avatar-large.primary {
    background: var(--google-blue-container);
    color: var(--google-blue);
}

.icon-avatar-large.success {
    background: var(--google-green-container);
    color: var(--google-green);
}

.icon-avatar-large.warning {
    background: var(--google-yellow-container);
    color: #F57C00;
}

.icon-avatar-large.error {
    background: var(--google-red-container);
    color: var(--google-red);
}

/* =========================================
   LINEAR PROGRESS
   ========================================= */
.linear-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--surface-grey);
    overflow: hidden;
}

.linear-progress .bar {
    height: 100%;
    border-radius: 2px;
    background: var(--google-blue);
    transition: width 0.4s var(--easing-std);
}

/* =========================================
   DISCOVERY CARDS (Intern Dashboard)
   ========================================= */
.discovery-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 120px;
    text-align: center;
}

.discovery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeUp 0.4s var(--easing-std) both;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
/* Display */
.hidden {
    display: none !important;
}

.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.d-block {
    display: block;
}

.d-inline-block {
    display: inline-block;
}

.d-grid {
    display: grid;
}

/* Flexbox */
.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-grow {
    flex-grow: 1;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

/* Alignment */
.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

/* Gap */
.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

/* Margin */
.m-0 {
    margin: 0;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.ml-auto {
    margin-left: auto;
}

.mr-1 {
    margin-right: 4px;
}

.mr-2 {
    margin-right: 8px;
}

/* Padding */
.p-0 {
    padding: 0;
}

.p-1 {
    padding: 4px;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.p-5 {
    padding: 20px;
}

.p-6 {
    padding: 24px;
}

.px-2 {
    padding-left: 8px;
    padding-right: 8px;
}

.px-3 {
    padding-left: 12px;
    padding-right: 12px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.py-4 {
    padding-top: 16px;
    padding-bottom: 16px;
}

.py-6 {
    padding-top: 24px;
    padding-bottom: 24px;
}

.py-10 {
    padding-top: 40px;
    padding-bottom: 40px;
}

.py-12 {
    padding-top: 48px;
    padding-bottom: 48px;
}

/* Width / Height */
.w-full {
    width: 100%;
}

.min-w-250 {
    min-width: 250px;
}

.min-w-150 {
    min-width: 150px;
}

.max-w-xs {
    max-width: 20rem;
}

/* Text */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-xs {
    font-size: 11px;
}

.text-sm {
    font-size: 13px;
}

.text-base {
    font-size: 16px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

/* Font Weight */
.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.font-mono {
    font-family: 'Roboto Mono', monospace;
}

.fw-bold {
    font-weight: 700;
}

/* Text Colors */
.text-muted {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--google-blue) !important;
}

.text-success {
    color: var(--google-green) !important;
}

.text-warning {
    color: var(--google-yellow) !important;
}

.text-danger,
.text-error {
    color: var(--google-red) !important;
}

.text-secondary {
    color: var(--text-secondary);
}

/* Background */
.bg-white {
    background-color: var(--surface-white);
}

.bg-surface {
    background-color: var(--surface-grey);
}

.bg-surface-variant {
    background-color: var(--surface-variant);
}

.bg-primary-container {
    background-color: var(--google-blue-container);
}

.bg-success-container {
    background-color: var(--google-green-container);
}

.bg-warning-container {
    background-color: var(--google-yellow-container);
}

.bg-error-container {
    background-color: var(--google-red-container);
}

.bg-light {
    background-color: var(--surface-grey);
}

/* Border */
.border-b {
    border-bottom: 1px solid var(--border-color);
}

.border-t {
    border-top: 1px solid var(--border-color);
}

.border-light {
    border-color: var(--surface-grey);
}

.border-error {
    border-color: var(--google-red) !important;
}

/* Border Radius */
.rounded {
    border-radius: var(--radius-md);
}

.rounded-full {
    border-radius: 50%;
}

.rounded-xl {
    border-radius: var(--radius-lg);
}

.rounded-pill {
    border-radius: var(--radius-pill);
}

/* Shadow */
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.shadow-md {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Misc */
.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.block {
    display: block;
}

/* Grid */
.col-span-2 {
    grid-column: span 2;
}

.col-span-full {
    grid-column: 1 / -1;
}

/* Hover Effects */
.hover-elevate {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-elevate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hover\:bg-gray-50:hover {
    background: rgba(0, 0, 0, 0.02);
}

.hover\:bg-gray-200:hover {
    background: rgba(0, 0, 0, 0.06);
}

.hover-primary:hover {
    color: var(--google-blue);
    border-color: var(--google-blue);
}

/* Responsive Show/Hide */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none !important;
}

.d-sm-none {
    display: block;
}

/* =========================================
   RESPONSIVE — MOBILE (< 768px)
   ========================================= */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        z-index: 100;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        height: 100vh;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggler {
        display: flex !important;
    }

    .main-content {
        padding: 16px;
        padding-top: 72px;
        /* Space for hamburger */
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .d-sm-none {
        display: none !important;
    }

    .headline-large {
        font-size: 24px;
        line-height: 32px;
    }

    .headline-medium {
        font-size: 22px;
        line-height: 28px;
    }

    .display-large {
        font-size: 36px;
        line-height: 44px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
        padding-top: 72px;
    }

    .btn-lg {
        height: 44px;
        padding: 0 24px;
        font-size: 14px;
    }
}

/* Glass Panel (used in admin) */
.glass-panel {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* Stats Grid (used in tasks/attendance) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue {
    background: var(--google-blue-container);
    color: #1967D2;
}

.stat-icon.red {
    background: var(--google-red-container);
    color: #C5221F;
}

.stat-icon.green {
    background: var(--google-green-container);
    color: #137333;
}

.stat-icon.orange,
.stat-icon.yellow {
    background: var(--google-yellow-container);
    color: #F57C00;
}

.stat-icon.purple {
    background: #F3E5F5;
    color: #7B1FA2;
}

/* Meta Tags (used in tasks) */
.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--surface-grey);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

/* Task Cards */
.task-card {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeUp 0.3s var(--easing-std) both;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.task-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.task-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 12px;
    line-height: 1.5;
}

/* Tasks Container */
.tasks-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .tasks-container {
        grid-template-columns: 1fr;
    }
}

/* Status Badge (used in leaves/pms) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #FFF3E0;
    color: #E65100;
}

.status-approved,
.status-active {
    background: #E6F4EA;
    color: #137333;
}

.status-rejected {
    background: #FCE8E6;
    color: #C5221F;
}

/* Input Icon Wrapper (PMS) */
.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 20px;
}

.form-control.with-icon {
    padding-left: 40px;
}

/* Level Badges (PMS) */
.level-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.level-beginner {
    background: var(--google-green-container);
    color: #137333;
}

.level-intermediate {
    background: var(--google-yellow-container);
    color: #B05A00;
}

.level-advanced {
    background: var(--google-red-container);
    color: #C5221F;
}

/* Domain Tag */
.domain-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--google-blue);
    background: var(--google-blue-container);
    padding: 2px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Project Cards (PMS) */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeUp 0.3s var(--easing-std) both;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Filter Bar */
.filter-bar {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}