@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Outlined');

:root {
    --main-color: rgba(60,60,60,1);
    --main-color-light: rgba(240,240,240,1);
    --main-color-ultra-light: rgba(250,250,250,1);
    --main-blue: rgb(31, 120, 253);
    --global-gap: 10px;
    --border-radius: 5px;
    --font-h1: 32px;
    --font-h2: 24px;
    --font-body: 16px;
    --font-small: 14px;
    --font-tiny: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Figtree', sans-serif;
}

a {
    text-decoration: none;
    color: var(--main-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--global-gap) * 2);
}

.material-icons-outlined {
    font-family: 'Material Icons Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    color: var(--main-color);
    vertical-align: middle;
}

.news {
    width: 100%;
    background-color: var(--main-color-light);
    color: var(--main-color);
    padding: 10px 0;
    font-size: var(--font-small);
}

.news .container {
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-news {
    position: absolute;
    right: 0;
    cursor: pointer;
    padding: var(--global-gap);
}

.news a {
    color: var(--main-color);
    font-weight: 700;
    text-decoration: underline;
    font-size: var(--font-small);
}

nav {
    height: 60px;
    background-color: white;
    position: relative;
    width: 100%;
    z-index: 1001;
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

nav .logo {
    font-size: var(--font-body);
    font-weight: 700;
    color: var(--main-color);
}

.hamburger {
    cursor: pointer;
}

nav .wrapper {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: white;
    width: 100%;
    flex-direction: column;
    padding: calc(var(--global-gap) * 2);
    z-index: 1000;
}

nav .wrapper.active {
    display: flex;
}

nav .wrapper .left,
nav .wrapper .right {
    display: flex;
    flex-direction: column;
    gap: calc(var(--global-gap) * 1.5);
}

nav .wrapper .right {
    margin-top: calc(var(--global-gap) * 2);
    padding-top: calc(var(--global-gap) * 2);
    border-top: 1px solid var(--main-color-ultra-light);
}

nav .wrapper a {
    padding: var(--global-gap);
    font-size: var(--font-body);
    font-weight: 500;
    transition: background-color 0.3s ease;
    border-radius: var(--border-radius);
}

nav .wrapper a:hover {
    background-color: var(--main-color-ultra-light);
}

.cta-button {
    background-color: var(--main-blue);
    color: white;
    text-align: center;
}

.cta-button:hover {
    color: white !important;
    background-color: rgb(2, 98, 245) !important;
}

.nav-item-with-dropdown .dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    font-size: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.nav-item-with-dropdown .dropdown-trigger:hover {
    background-color: var(--main-color-ultra-light);
}

.nav-item-with-dropdown .dropdown-trigger .material-icons-outlined {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.nav-item-with-dropdown.active .dropdown-trigger .material-icons-outlined {
    transform: rotate(180deg);
}

.nav-item-with-dropdown .dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 0;
    margin-top: var(--global-gap);
    gap: calc(var(--global-gap) * 1.5);
}

.nav-item-with-dropdown .dropdown-menu .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--global-gap);
    padding: 0;
}

.nav-item-with-dropdown.active .dropdown-menu {
    display: flex;
}

.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: var(--global-gap);
    padding: 0;
}

.dropdown-column .dropdown-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: var(--font-small);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    background-color: var(--main-color-ultra-light);
}

.dropdown-column .dropdown-heading .material-icons-outlined {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.dropdown-column.active .dropdown-heading .material-icons-outlined {
    transform: rotate(180deg);
}

.dropdown-column .dropdown-links {
    display: none;
    flex-direction: column;
    gap: calc(var(--global-gap) * 1.5);
    padding-left: calc(var(--global-gap) * 1.5);
    margin-top: calc(var(--global-gap) * 1.5);
}

.dropdown-column.active .dropdown-links {
    display: flex;
}

.dropdown-menu a {
    padding: 8px 15px !important;
    font-size: var(--font-small) !important;
}

@media screen and (max-width: 480px) {
    .nav-item-with-dropdown .dropdown-menu .container {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 992px) {

    nav .container {
        position: relative;
        justify-content: flex-start;
    }

    nav .logo {
        font-size: var(--font-h2);
        font-weight: 700;
        color: var(--main-color);
    }
    
    nav {
        height: 70px;
        border-bottom: 1px solid var(--main-color-ultra-light);
        transition: border-color 0.3s ease;
    }

    nav.dropdown-active {
        border-bottom-color: transparent;
    }

    .hamburger {
        display: none;
    }

    nav .wrapper {
        display: flex !important;
        position: static;
        flex-direction: row;
        width: auto;
        padding: 0;
        align-items: center;
        gap: calc(var(--global-gap) * 2);
        flex-grow: 1;
        justify-content: flex-end;
    }

    nav .wrapper .left,
    nav .wrapper .right {
        flex-direction: row;
        gap: calc(var(--global-gap) / 2);
        align-items: center;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    nav .wrapper .left {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    nav .wrapper a,
    .nav-item-with-dropdown .dropdown-trigger {
        padding: 8px 12px;
    }
    
    .nav-item-with-dropdown {
        position: static;
    }
    
    .nav-item-with-dropdown.active .dropdown-trigger {
        background-color: var(--main-color-ultra-light);
    }

    .nav-item-with-dropdown .dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + var(--global-gap) * 2);
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        background-color: white;
        padding: calc(var(--global-gap) * 4) 0;
        border-bottom: 1px solid var(--main-color-ultra-light);
    }

    .nav-item-with-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .nav-item-with-dropdown .dropdown-menu .container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: calc(var(--global-gap) * 4);
    }
    
    .dropdown-column {
        display: flex;
        flex-direction: column;
        gap: var(--global-gap);
        padding: 0;
        border-bottom: none;
        flex-basis: auto;
    }

    .dropdown-column .dropdown-heading {
        cursor: default;
        font-size: var(--font-small);
        color: var(--main-color);
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: block;
        padding: 8px 12px;
        border-radius: 0;
        background-color: transparent;
    }

    .dropdown-column .dropdown-heading .material-icons-outlined {
        display: none;
    }

    .dropdown-column .dropdown-links {
        display: flex;
        flex-direction: column;
        padding-left: 0;
        margin-top: 0;
        gap: var(--global-gap);
    }

    .dropdown-links a {
        font-weight: 500 !important;
        border-radius: var(--border-radius) !important;
        padding: 8px 12px !important;
        transition: background-color 0.3s ease;
        font-size: var(--font-small) !important;
    }

    .dropdown-links a:hover {
        background-color: var(--main-color-ultra-light) !important;
        color: var(--main-color);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0;
}

.hero h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: calc(var(--global-gap) * 2);
}

.hero .subheadline {
    font-size: var(--font-h2);
    max-width: 600px;
    margin: 0 auto calc(var(--global-gap) * 3);
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: calc(var(--global-gap) * 1.5);
}

.hero-cta .cta-button,
.hero-cta .cta-link {
    padding: 12px 24px;
    font-size: var(--font-body);
    font-weight: 600;
    border-radius: var(--border-radius);
}

.hero-cta .cta-link {
    background-color: var(--main-color-ultra-light);
}

.hero-cta .cta-link:hover {
    background-color: var(--main-color-light);
}

.hero-faces {
    display: flex;
    justify-content: center;
    margin-bottom: calc(var(--global-gap) * 4);
    height: 120px;
}

.face {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    box-shadow: 0 0 0 4px var(--main-color-ultra-light);
    background-color: var(--main-color-ultra-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    will-change: background-image;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.face:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 0 0 4px var(--main-color-ultra-light), 0 12px 24px rgba(0,0,0,0.12);
    z-index: 10;
}

.face:not(:first-child) {
    margin-left: calc(var(--global-gap) * -3);
}

@media screen and (max-width: 991px) {
    .hero {
        text-align: left;
        padding: calc(var(--global-gap) * 6) 0;
    }

    .hero-faces {
        height: 80px;
        margin-bottom: calc(var(--global-gap) * 3);
        justify-content: flex-start;
    }

    .face {
        height: 80px;
        width: 80px;
        border-width: 3px;
        box-shadow: 0 0 0 3px var(--main-color-ultra-light);
    }

    .face:not(:first-child) {
        margin-left: calc(var(--global-gap) * -2);
    }

    .hero h1 {
        font-size: 42px;
        line-height: 1.2;
    }

    .hero .subheadline {
        font-size: var(--font-body);
        max-width: none;
        margin: 0 0 calc(var(--global-gap) * 3);
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--global-gap);
    }

    .hero-cta .cta-button,
    .hero-cta .cta-link {
        text-align: center;
    }
}

/* Dashboard Styles */
.dashboard-container {
    display: grid;
    grid-template-columns: 240px 1fr 380px;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background-color: white;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-right: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
    max-height: 100vh;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.sidebar-user:hover {
    background-color: rgba(0,0,0,0.04);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--main-color-ultra-light);
    flex-shrink: 0;
    will-change: background-image;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.sidebar-user .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.6);
}

.compose-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-btn:hover {
    background-color: rgba(0,0,0,0.04);
}

.compose-btn .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.6);
}

.sidebar-search {
    margin: 12px;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search .material-icons-outlined {
    position: absolute;
    left: 12px;
    font-size: 18px;
    color: rgba(60,60,60,0.4);
    pointer-events: none;
}

.sidebar-search input {
    width: 100%;
    padding: 8px 12px 8px 40px;
    border: 1px solid rgba(0,0,0,0.08);
    background-color: rgba(0,0,0,0.02);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Figtree', sans-serif;
    outline: none;
    transition: all 0.15s ease;
    color: var(--main-color);
}

.sidebar-search input:hover {
    background-color: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}

.sidebar-search input:focus {
    background-color: white;
    border-color: rgba(0,0,0,0.15);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.02);
}

.sidebar-search input::placeholder {
    color: rgba(60,60,60,0.4);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
}

.sidebar-bottom {
    padding: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
    background-color: white;
    margin-top: auto;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(60,60,60,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section:not(:has(.nav-section-header)) .nav-section-title {
    padding: 6px 12px;
}

.nav-section-header .nav-section-title {
    padding: 0;
}

.add-label-btn {
    background: transparent;
    border: none;
    padding: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-label-btn:hover {
    background-color: rgba(0,0,0,0.06);
}

.add-label-btn .material-icons-outlined {
    font-size: 16px;
    color: rgba(60,60,60,0.5);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    color: rgba(60,60,60,0.85);
    text-decoration: none;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.sidebar-nav-item:hover {
    background-color: rgba(0,0,0,0.04);
}

.sidebar-nav-item.active {
    background-color: rgba(0,0,0,0.06);
    color: var(--main-color);
    font-weight: 500;
}

.sidebar-nav-item .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.5);
}

.nav-item-count {
    margin-left: auto;
    background: rgba(0,0,0,0.08);
    color: rgba(60,60,60,0.7);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.sidebar-nav-item.active .nav-item-count {
    background: rgba(0,0,0,0.12);
    color: var(--main-color);
}

/* Dashboard Main Content */
.dashboard-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #ffffff;
    height: 100vh;
    max-height: 100vh;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inbox-icon {
    color: rgb(239, 68, 68);
    font-size: 24px;
}

.dashboard-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
}

.auto-label-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: var(--font-small);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auto-label-btn:hover {
    background-color: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.2);
}

.auto-label-btn .material-icons-outlined {
    font-size: 16px;
    color: rgba(60,60,60,0.6);
}

/* Email List */
.email-list {
    flex: 1 1 auto; /* grow and shrink as needed */
    overflow-y: auto;
    min-height: 0; /* avoid forcing container height */
}

/* Email List Skeleton */
.email-list-skeleton {
    flex: 1 1 auto;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

.email-list-skeleton::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

.skeleton-email-item {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    min-height: 60px;
}

.skeleton-sender,
.skeleton-subject,
.skeleton-label,
.skeleton-urgency {
    height: 14px;
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.04) 0%, 
        rgba(0,0,0,0.06) 20%,
        rgba(0,0,0,0.08) 40%,
        rgba(0,0,0,0.06) 60%,
        rgba(0,0,0,0.04) 80%,
        rgba(0,0,0,0.04) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-loading 1.8s ease-in-out infinite;
}

.skeleton-email-item:nth-child(1) .skeleton-sender,
.skeleton-email-item:nth-child(1) .skeleton-subject {
    animation-delay: 0s;
}

.skeleton-email-item:nth-child(2) .skeleton-sender,
.skeleton-email-item:nth-child(2) .skeleton-subject {
    animation-delay: 0.1s;
}

.skeleton-email-item:nth-child(3) .skeleton-sender,
.skeleton-email-item:nth-child(3) .skeleton-subject {
    animation-delay: 0.2s;
}

.skeleton-email-item:nth-child(4) .skeleton-sender,
.skeleton-email-item:nth-child(4) .skeleton-subject {
    animation-delay: 0.3s;
}

.skeleton-sender {
    width: 140px;
}

.skeleton-subject {
    width: 65%;
    max-width: 400px;
}

.skeleton-email-item:nth-child(even) .skeleton-sender {
    width: 100px;
}

.skeleton-email-item:nth-child(3n) .skeleton-subject {
    width: 50%;
}

.skeleton-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skeleton-label {
    width: 60px;
    height: 20px;
    border-radius: 10px;
}

.skeleton-urgency {
    width: 50px;
    height: 20px;
    border-radius: 10px;
}

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

/* Empty Inbox State */
.empty-inbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: rgba(60,60,60,0.4);
    height: 100%;
    min-height: 300px;
}

.empty-inbox .material-icons-outlined {
    font-size: 72px;
    margin-bottom: 20px;
    color: rgba(60,60,60,0.25);
}

.empty-inbox p {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    text-align: center;
    max-width: 300px;
    line-height: 1.5;
}

.email-item {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 4px 16px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.email-item > .email-sender {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
}

.email-item > .email-subject {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}

.email-item > .email-summary {
    grid-column: 2;
    grid-row: 2;
}

.email-item > .email-meta {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
}

.email-item:hover {
    background-color: rgba(0,0,0,0.02);
}

.email-sender {
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-subject {
    font-size: 14px;
    color: rgba(60,60,60,0.6);
    font-weight: 400;
}

/* AI-generated email summary */
.email-summary {
    font-size: 13px;
    color: rgba(60,60,60,0.7);
    font-weight: 500;
    margin-top: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Email priority badges */
.email-priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-priority-badge.urgent {
    background-color: rgb(220, 38, 38);
    color: white;
}

.email-priority-badge.high {
    background-color: rgb(249, 115, 22);
    color: white;
}

.email-priority-badge.medium {
    background-color: rgb(245, 158, 11);
    color: white;
}

/* AI-generated category tag */
.email-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: var(--main-blue);
    color: white;
}

.email-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.email-labels-container {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.email-label-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Spam indicator badge (always first) */
.spam-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ea4335;
    background: rgba(234, 67, 53, 0.12);
    border: 1px solid rgba(234, 67, 53, 0.25);
    margin-right: 2px;
}

.spam-indicator .material-icons-outlined {
    font-size: 14px;
    color: #ea4335;
}

.email-label {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.label-hiring {
    background-color: rgba(59, 130, 246, 0.12);
    color: rgb(37, 99, 235);
}

.label-support {
    background-color: rgba(236, 72, 153, 0.12);
    color: rgb(219, 39, 119);
}

.label-cold {
    background-color: rgba(251, 146, 60, 0.12);
    color: rgb(234, 88, 12);
}

.email-urgency {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.urgency-urgent {
    background-color: rgba(239, 68, 68, 0.12);
    color: rgb(220, 38, 38);
}

.urgency-high {
    background-color: rgba(249, 115, 22, 0.12);
    color: rgb(234, 88, 12);
}

.urgency-medium {
    background-color: rgba(245, 158, 11, 0.12);
    color: rgb(217, 119, 6);
}

.urgency-low {
    background-color: rgba(156, 163, 175, 0.12);
    color: rgb(107, 114, 128);
}

/* Email Detail View */
.email-detail-view {
    flex: 1;
    overflow-y: auto;
    background-color: white;
    display: flex;
    flex-direction: column;
}

.email-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.back-to-list-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-list-btn:hover {
    background-color: rgba(0,0,0,0.04);
}

.back-to-list-btn .material-icons-outlined {
    font-size: 22px;
    color: rgba(60,60,60,0.7);
}

.email-detail-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.email-action-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-action-btn:hover {
    background-color: rgba(0,0,0,0.04);
}

.email-action-btn .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.6);
}

.email-detail-content {
    flex: 1;
    padding: 32px 24px;
    overflow-y: auto;
}

.email-detail-subject {
    font-size: 24px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 24px;
    line-height: 1.3;
}

.email-detail-from {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.from-avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.from-avatar .material-icons-outlined {
    font-size: 24px;
    color: rgba(60,60,60,0.5);
}

.from-info {
    flex: 1;
}

.from-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 2px;
}

.from-email {
    font-size: 13px;
    color: rgba(60,60,60,0.6);
}

.email-detail-meta {
    text-align: right;
}

.email-time {
    font-size: 13px;
    color: rgba(60,60,60,0.6);
}

.email-detail-body {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(60,60,60,0.85);
}

.email-detail-body p {
    margin-bottom: 16px;
}

.email-detail-body p:last-child {
    margin-bottom: 0;
}

.email-reply-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(0,0,0,0.06);
    background-color: white;
}

.reply-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Figtree', sans-serif;
}

.reply-btn:hover {
    background-color: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.2);
}

.reply-btn .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.6);
}

/* Contacts View */
.contacts-view {
    flex: 1;
    overflow: hidden;
    background-color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.contacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: white;
}

.contacts-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contacts-header-left .material-icons-outlined {
    font-size: 24px;
    color: rgb(34, 197, 94);
}

.contacts-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
}

/* Table Search Bar */
.table-search-container {
    padding: 16px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: white;
}

.table-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 500px;
}

.table-search-wrapper .material-icons-outlined {
    position: absolute;
    left: 12px;
    font-size: 20px;
    color: rgba(60,60,60,0.4);
    pointer-events: none;
    z-index: 2;
}

.autocomplete-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    background-color: rgba(0,0,0,0.02);
    border-radius: 8px;
    transition: background-color 0.15s ease;
    overflow: hidden;
}

.second-icon-clear .material-icons-outlined {
    position: relative;
    left: 0;
}

.autocomplete-wrapper:hover {
    background-color: rgba(0,0,0,0.04);
}

.autocomplete-wrapper:focus-within {
    background-color: white;
}

.table-search-input {
    width: 100%;
    padding: 10px 40px 10px 44px;
    border: 1px solid rgba(0,0,0,0.08);
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Figtree', sans-serif;
    outline: none;
    transition: all 0.15s ease;
    color: var(--main-color);
    position: relative;
    z-index: 2;
}

.table-search-input:hover {
    border-color: rgba(0,0,0,0.12);
}

.table-search-input:focus {
    border-color: var(--main-blue);
    box-shadow: 0 0 0 3px rgba(31, 120, 253, 0.08);
}

.table-search-input::placeholder {
    color: rgba(60,60,60,0.4);
}

.table-search-input::selection {
    background-color: rgba(31, 120, 253, 0.2);
    color: var(--main-color);
}

.table-search-input::-moz-selection {
    background-color: rgba(31, 120, 253, 0.2);
    color: var(--main-color);
}

/* Autocomplete Preview (gray text) */
.autocomplete-preview {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(60,60,60,0.25);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    font-family: 'Figtree', sans-serif;
    z-index: 1;
    padding-right: 40px;
    padding-left: 0;
}

/* Clear Search Button */
.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.12s ease;
    pointer-events: auto;
}

.clear-search-btn:hover {
    background-color: rgba(0,0,0,0.08);
}

.clear-search-btn .material-icons-outlined {
    font-size: 16px;
    color: rgba(60,60,60,0.6);
}

.table-search-wrapper.has-value .clear-search-btn {
    display: flex;
}

.add-contact-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
}

.add-contact-btn:hover {
    background-color: rgb(40, 40, 40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.add-contact-btn .material-icons-outlined {
    font-size: 18px;
    color: white;
}

.contacts-table-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px 32px 32px;
}

/* Settings View */
.settings-view {
    flex: 1;
    overflow: hidden;
    background-color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.settings-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: white;
}

.settings-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-header-left .material-icons-outlined {
    font-size: 24px;
    color: rgba(60,60,60,0.6);
}

.settings-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
}

.settings-content {
    flex: 1;
    padding: 32px 40px;
}

.settings-section {
    margin-bottom: 40px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(60,60,60,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-section-title .material-icons-outlined {
    font-size: 16px;
    color: rgba(60,60,60,0.4);
}

.settings-table {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.settings-table-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background-color 0.15s ease;
}

.settings-table-row:last-child {
    border-bottom: none;
}

.settings-table-row:hover {
    background-color: rgba(0,0,0,0.02);
}

.settings-table-cell {
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.label-cell {
    font-weight: 500;
    color: rgba(60,60,60,0.65);
    border-right: 1px solid rgba(0,0,0,0.06);
}

.value-cell {
    font-weight: 400;
    color: var(--main-color);
}

.value-cell.empty {
    color: rgba(60,60,60,0.35);
    font-style: italic;
}

/* Legacy styles for backwards compatibility */
.settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0,0,0,0.06);
}

.settings-section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
}

.settings-section-header .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.4);
}

.settings-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background-color 0.15s ease;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row:hover {
    background-color: rgba(0,0,0,0.02);
}

.settings-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(60,60,60,0.7);
}

.settings-value {
    font-size: 14px;
    font-weight: 400;
    color: var(--main-color);
    text-align: right;
}

.settings-value.empty {
    color: rgba(60,60,60,0.35);
    font-style: italic;
}

/* Email connection card specific styles */
.email-connection-card {
    padding: 0;
}

.email-connection-status {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.email-connection-status.connected {
    background: rgba(34, 197, 94, 0.04);
}

.email-connection-status.disconnected {
    background: rgba(239, 68, 68, 0.04);
}

.connection-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.connection-icon.connected {
    color: rgb(34, 197, 94);
}

.connection-icon.disconnected {
    color: rgb(239, 68, 68);
}

.connection-text {
    flex: 1;
}

.connection-title {
    font-weight: 600;
    color: var(--main-color);
    font-size: 15px;
    margin-bottom: 4px;
}

.connection-email {
    color: rgba(60,60,60,0.6);
    font-size: 13px;
    margin-bottom: 2px;
}

.connection-sync {
    color: rgba(60,60,60,0.5);
    font-size: 12px;
}

.email-connection-actions {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
}

.email-connection-actions .ui-btn {
    flex: 1;
    font-size: 13px;
    padding: 8px 16px;
}

.connection-icon.disconnected {
    color: rgb(239, 68, 68);
}

.connection-text {
    flex: 1;
}

.connection-title {
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 4px;
    font-size: 15px;
}

.connection-email {
    font-size: 13px;
    color: rgba(60,60,60,0.8);
    margin-bottom: 2px;
}

.connection-sync {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
}

.email-connection-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
}

.email-connection-actions .ui-btn {
    flex: 1;
}

/* Customers View */
.customers-view {
    flex: 1;
    overflow: hidden;
    background-color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.customers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: white;
}

.customers-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customers-header-left .material-icons-outlined {
    font-size: 24px;
    color: rgb(59, 130, 246);
}

.customers-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
}

.add-customer-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
}

.add-customer-btn:hover {
    background-color: rgb(40, 40, 40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.add-customer-btn .material-icons-outlined {
    font-size: 18px;
    color: white;
}

.customers-table-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px 32px 32px;
}

/* Customers Table */
.customers-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border: none;
    border-radius: 0;
    overflow: visible;
    table-layout: fixed; /* Enable proper column widths and ellipsis */
}

.customers-table thead {
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.customers-table thead::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.06);
}

.customers-table th {
    padding: 12px 12px 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: rgba(60, 60, 60, 0.45);
    text-transform: none;
    letter-spacing: normal;
    border-bottom: none;
    white-space: nowrap;
    vertical-align: middle;
    background: white;
}

.customers-table th.col-actions,
.contacts-table th.col-actions {
    text-align: right;
    padding-right: 16px;
}

.customers-table tbody tr {
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background-color 0.12s ease;
}

.customers-table tbody tr:first-child td {
    padding-top: 14px;
}

.customers-table tbody tr:last-child {
    border-bottom: none;
}

.customers-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
    cursor: pointer;
}

.customers-table tbody tr:active {
    background-color: rgba(0,0,0,0.03);
}

.customers-table tbody tr:hover td[title]:not(.col-actions) {
    position: relative;
}

.customers-table td {
    padding: 12px 12px;
    font-size: 14px;
    color: rgba(60, 60, 60, 0.85);
    vertical-align: middle;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customers-table .col-name {
    width: 16%;
    min-width: 120px;
    max-width: 160px;
    font-weight: 500;
    color: var(--main-color);
}

.customers-table .col-email {
    width: 20%;
    min-width: 140px;
    max-width: 200px;
    color: rgba(60, 60, 60, 0.7);
}

.customers-table .col-phone {
    width: 14%;
    min-width: 100px;
    max-width: 130px;
    color: rgba(60, 60, 60, 0.7);
}

.customers-table .col-address {
    width: 22%;
    min-width: 120px;
    max-width: 220px;
    color: rgba(60, 60, 60, 0.65);
}

.customers-table .col-notes {
    width: 18%;
    min-width: 100px;
    max-width: 180px;
    color: rgba(60, 60, 60, 0.6);
    font-size: 13px;
}

.customers-table .col-actions {
    width: 10%;
    min-width: 70px;
    max-width: 90px;
    text-align: right;
    overflow: visible; /* Allow action buttons to show */
}

.customers-table .col-actions,
.contacts-table .col-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.customers-table .col-actions .action-btn,
.contacts-table .col-actions .contact-action-btn {
    display: inline-flex;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.customers-table tbody tr:hover .action-btn,
.contacts-table tbody tr:hover .contact-action-btn {
    opacity: 1;
}

/* Customers Empty State */
.customers-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.customers-empty .material-icons-outlined {
    font-size: 72px;
    color: rgba(60,60,60,0.25);
    margin-bottom: 20px;
}

.customers-empty p {
    font-size: 15px;
    font-weight: 500;
    color: rgba(60,60,60,0.5);
    margin: 0 0 20px 0;
}

.add-first-customer-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
}

.add-first-customer-btn:hover {
    background-color: rgb(40, 40, 40);
    transform: translateY(-1px);
}

/* Customer/Contact Action Buttons (shared) */
.action-btn {
    background: transparent;
    border: none;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

.action-btn:hover {
    background: rgba(0,0,0,0.05);
}

.action-btn .material-icons-outlined {
    font-size: 18px;
    color: rgba(60, 60, 60, 0.5);
}

.action-btn.delete-customer-btn:hover,
.action-btn.delete-contact-btn:hover {
    background: rgba(239, 68, 68, 0.08);
}

.action-btn.delete-customer-btn:hover .material-icons-outlined,
.action-btn.delete-contact-btn:hover .material-icons-outlined {
    color: rgb(220, 38, 38);
}

.action-btn.edit-customer-btn:hover .material-icons-outlined,
.action-btn.edit-contact-btn:hover .material-icons-outlined {
    color: rgb(2, 98, 245);
}

/* Cases View - Table Format Like Contacts/Customers */
.cases-view {
    flex: 1;
    overflow: hidden;
    background-color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.cases-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: white;
}

.cases-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cases-header-left .material-icons-outlined {
    font-size: 24px;
    color: rgb(168, 85, 247);
}

.cases-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
}

.add-case-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
}

.add-case-btn:hover {
    background-color: rgb(40, 40, 40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.add-case-btn .material-icons-outlined {
    font-size: 18px;
    color: white;
}

.cases-filters {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.cases-filters .filter-btn {
    padding: 6px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Figtree', sans-serif;
    color: rgba(60,60,60,0.7);
}

.cases-filters .filter-btn:hover {
    background-color: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.15);
}

.cases-filters .filter-btn.active {
    background-color: rgba(0,0,0,0.06);
    color: var(--main-color);
    border-color: rgba(0,0,0,0.12);
    font-weight: 500;
}

.cases-table-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px 32px 32px;
}

/* Cases Table - Matches Contacts/Customers Style */
.cases-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border: none;
    border-radius: 0;
    overflow: visible;
    table-layout: fixed;
}

.cases-table thead {
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cases-table thead::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.06);
}

.cases-table th {
    padding: 12px 12px 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: rgba(60, 60, 60, 0.45);
    text-transform: none;
    letter-spacing: normal;
    border-bottom: none;
    white-space: nowrap;
    vertical-align: middle;
    background: white;
}

.cases-table th.col-actions {
    text-align: right;
    padding-right: 16px;
}

.cases-table tbody tr {
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background-color 0.12s ease;
}

.cases-table tbody tr:first-child td {
    padding-top: 14px;
}

.cases-table tbody tr:last-child {
    border-bottom: none;
}

.cases-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
    cursor: pointer;
}

.cases-table tbody tr:active {
    background-color: rgba(0,0,0,0.03);
}

.cases-table td {
    padding: 12px 12px;
    font-size: 14px;
    color: rgba(60, 60, 60, 0.85);
    vertical-align: middle;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cases-table .col-title {
    width: 32%;
    min-width: 180px;
    max-width: 350px;
}

.cases-table .col-type {
    width: 13%;
    min-width: 100px;
    max-width: 130px;
}

.cases-table .col-status {
    width: 14%;
    min-width: 100px;
    max-width: 130px;
}

.cases-table .col-priority {
    width: 12%;
    min-width: 90px;
    max-width: 110px;
}

.cases-table .col-created {
    width: 13%;
    min-width: 100px;
    max-width: 130px;
    color: rgba(60, 60, 60, 0.65);
}

.cases-table .col-actions {
    width: 16%;
    min-width: 110px;
    max-width: 130px;
    text-align: right;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.cases-table .col-actions .action-btn {
    display: inline-flex;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.cases-table tbody tr:hover .action-btn {
    opacity: 1;
}

.case-title {
    font-weight: 500;
    color: var(--main-color);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.case-desc-preview {
    font-size: 13px;
    color: rgba(60, 60, 60, 0.6);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.case-type-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(168, 85, 247, 0.08);
    color: rgb(126, 34, 206);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    border: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.status-badge.status-open {
    background: rgba(59, 130, 246, 0.08);
    color: rgb(37, 99, 235);
}

.status-badge.status-in-progress {
    background: rgba(249, 115, 22, 0.08);
    color: rgb(234, 88, 12);
}

.status-badge.status-waiting {
    background: rgba(234, 179, 8, 0.08);
    color: rgb(202, 138, 4);
}

.status-badge.status-resolved {
    background: rgba(34, 197, 94, 0.08);
    color: rgb(22, 163, 74);
}

.status-badge.status-closed {
    background: rgba(107, 114, 128, 0.08);
    color: rgb(75, 85, 99);
}

.priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.priority-badge.priority-low {
    background: rgba(107, 114, 128, 0.08);
    color: rgb(107, 114, 128);
}

.priority-badge.priority-medium {
    background: rgba(59, 130, 246, 0.08);
    color: rgb(37, 99, 235);
}

.priority-badge.priority-high {
    background: rgba(249, 115, 22, 0.08);
    color: rgb(234, 88, 12);
}

.priority-badge.priority-urgent {
    background: rgba(239, 68, 68, 0.08);
    color: rgb(239, 68, 68);
}

.cases-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.cases-empty .material-icons-outlined {
    font-size: 72px;
    color: rgba(60,60,60,0.25);
    margin-bottom: 20px;
}

.cases-empty p {
    font-size: 15px;
    font-weight: 500;
    color: rgba(60,60,60,0.5);
    margin: 0 0 8px 0;
}

.cases-empty .empty-subtitle {
    font-size: 13px;
    color: rgba(60,60,60,0.5);
    margin: 0 0 20px 0;
    max-width: 400px;
    line-height: 1.4;
}

.add-first-case-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
}

.add-first-case-btn:hover {
    background-color: rgb(40, 40, 40);
    transform: translateY(-1px);
}

.case-detail-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.case-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.back-to-cases-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.back-to-cases-btn:hover {
    background-color: rgba(0,0,0,0.04);
}

.back-to-cases-btn .material-icons-outlined {
    font-size: 22px;
    color: rgba(60,60,60,0.7);
}

.case-detail-title-section {
    flex: 1;
}

.case-detail-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--main-color);
}

.case-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.case-type-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(168, 85, 247, 0.1);
    color: rgb(126, 34, 206);
}

.case-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 24px;
}

.case-detail-info h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(60,60,60,0.5);
    margin: 0 0 16px 0;
}

.case-detail-description {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(60,60,60,0.85);
    margin: 0 0 32px 0;
    white-space: pre-wrap;
}

.case-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-timeline-item {
    display: flex;
    gap: 12px;
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.12s ease;
}

.case-timeline-item:hover {
    background-color: rgba(0,0,0,0.02);
}

.timeline-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.timeline-email .timeline-icon {
    background: rgba(59, 130, 246, 0.08);
}

.timeline-email .timeline-icon .material-icons-outlined {
    color: rgb(37, 99, 235);
    font-size: 20px;
}

.timeline-message .timeline-icon {
    background: rgba(168, 85, 247, 0.08);
}

.timeline-message .timeline-icon .material-icons-outlined {
    color: rgb(147, 51, 234);
    font-size: 20px;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

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

.timeline-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(60,60,60,0.7);
}

.timeline-time {
    font-size: 11px;
    color: rgba(60,60,60,0.5);
}

.timeline-details p {
    font-size: 13px;
    color: rgba(60,60,60,0.65);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.timeline-details p:last-child {
    margin-bottom: 8px;
}

.timeline-details strong {
    font-weight: 600;
    color: rgba(60,60,60,0.7);
}

.timeline-body {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(60,60,60,0.85);
    background: rgba(0,0,0,0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.06);
    white-space: pre-wrap;
    max-height: 180px;
    overflow-y: auto;
}

.timeline-body::-webkit-scrollbar {
    width: 6px;
}

.timeline-body::-webkit-scrollbar-track {
    background: transparent;
}

.timeline-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

.timeline-empty {
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    color: rgba(60,60,60,0.5);
}

/* Modal Overlay and Content (shared for contacts/customers/cases) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.2s ease;
}

.modal-content.modal-large {
    max-width: 800px;
}

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

.modal-body.modal-scrollable {
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.case-detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.case-detail-section {
    margin-bottom: 32px;
}

.case-detail-section:last-child {
    margin-bottom: 0;
}

.case-detail-section h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(60,60,60,0.5);
    margin: 0 0 12px 0;
}

.case-description-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(60,60,60,0.85);
    white-space: pre-wrap;
    margin: 0;
}

.case-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case-timeline-item {
    display: flex;
    gap: 12px;
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 14px;
    transition: all 0.12s ease;
}

.case-timeline-item:hover {
    background-color: rgba(0,0,0,0.02);
}

.timeline-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.timeline-email .timeline-icon {
    background: rgba(59, 130, 246, 0.08);
}

.timeline-email .timeline-icon .material-icons-outlined {
    color: rgb(37, 99, 235);
    font-size: 20px;
}

.timeline-message .timeline-icon {
    background: rgba(168, 85, 247, 0.08);
}

.timeline-message .timeline-icon .material-icons-outlined {
    color: rgb(147, 51, 234);
    font-size: 20px;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

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

.timeline-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(60,60,60,0.7);
}

.timeline-time {
    font-size: 11px;
    color: rgba(60,60,60,0.5);
}

.timeline-details p {
    font-size: 13px;
    color: rgba(60,60,60,0.65);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.timeline-details p:last-child {
    margin-bottom: 6px;
}

.timeline-details strong {
    font-weight: 600;
    color: rgba(60,60,60,0.7);
}

.timeline-body {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(60,60,60,0.85);
    background: rgba(0,0,0,0.02);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.06);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.timeline-body::-webkit-scrollbar {
    width: 6px;
}

.timeline-body::-webkit-scrollbar-track {
    background: transparent;
}

.timeline-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

.timeline-empty {
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    color: rgba(60,60,60,0.5);
    font-style: italic;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background-color: rgba(0,0,0,0.06);
}

.modal-close-btn .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.6);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(60,60,60,0.8);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.15s ease;
    background-color: white;
    font-family: 'Figtree', sans-serif;
    color: var(--main-color);
}

.form-input:hover {
    border-color: rgba(0,0,0,0.18);
}

.form-input:focus {
    border-color: rgba(0, 122, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.08);
}

.form-input::placeholder {
    color: rgba(60,60,60,0.4);
}

textarea.form-input {
    resize: vertical;
    min-height: 60px;
    font-family: 'Figtree', sans-serif;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background-color: #fafafa;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Figtree', sans-serif;
    border: 1px solid rgba(0,0,0,0.12);
}

.btn-secondary {
    background: white;
    color: var(--main-color);
    border: 1px solid rgba(0,0,0,0.12);
}

.btn-secondary:hover {
    background-color: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.2);
}

.btn-primary {
    background: var(--main-color);
    color: white;
    border: 1px solid var(--main-color);
}

.btn-primary:hover {
    background-color: rgb(40, 40, 40);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 200px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: rgb(21, 128, 61);
}

.notification.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: rgb(220, 38, 38);
}

.notification.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: rgb(37, 99, 235);
}

/* Contacts View */

/* Notion-style Table */
.contacts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border: none;
    border-radius: 0;
    overflow: visible;
    table-layout: fixed; /* Enable proper column widths and ellipsis */
}

.contacts-table thead {
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.contacts-table thead::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.06);
}

.contacts-table th {
    padding: 12px 12px 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: rgba(60, 60, 60, 0.45);
    text-transform: none;
    letter-spacing: normal;
    border-bottom: none;
    white-space: nowrap;
    vertical-align: middle;
    background: white;
}

.contacts-table tbody tr {
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background-color 0.12s ease;
}

.contacts-table tbody tr:first-child td {
    padding-top: 14px;
}

.contacts-table tbody tr:last-child {
    border-bottom: none;
}

.contacts-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
    cursor: pointer;
}

.contacts-table tbody tr:active {
    background-color: rgba(0,0,0,0.03);
}

.contacts-table tbody tr:hover td[title]:not(.col-actions) {
    position: relative;
}

.contacts-table td {
    padding: 12px 12px;
    font-size: 14px;
    color: rgba(60, 60, 60, 0.85);
    vertical-align: middle;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contacts-table .col-name {
    width: 20%;
    min-width: 120px;
    max-width: 160px;
}

.contacts-table .col-email {
    width: 25%;
    min-width: 140px;
    max-width: 200px;
}

.contacts-table .col-profession {
    width: 18%;
    min-width: 110px;
    max-width: 150px;
}

.contacts-table .col-notes {
    width: 27%;
    min-width: 120px;
    max-width: 240px;
}

.contacts-table .col-actions {
    width: 10%;
    min-width: 70px;
    max-width: 90px;
    text-align: right;
    overflow: visible; /* Allow action buttons to show */
}

.contact-name {
    font-weight: 500;
    color: var(--main-color);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.contact-email {
    color: rgba(60, 60, 60, 0.7);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.contact-profession {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(34, 197, 94, 0.08);
    color: rgb(21, 128, 61);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    border: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Different colors for different professions */
.contact-profession[data-profession*="elektriker" i],
.contact-profession[data-profession*="electrician" i] {
    background: rgba(251, 146, 60, 0.08);
    color: rgb(194, 65, 12);
}

.contact-profession[data-profession*="klempner" i],
.contact-profession[data-profession*="plumber" i],
.contact-profession[data-profession*="sanitär" i] {
    background: rgba(59, 130, 246, 0.08);
    color: rgb(29, 78, 216);
}

.contact-profession[data-profession*="heizung" i],
.contact-profession[data-profession*="heating" i] {
    background: rgba(239, 68, 68, 0.08);
    color: rgb(185, 28, 28);
}

.contact-profession[data-profession*="schlosser" i],
.contact-profession[data-profession*="locksmith" i] {
    background: rgba(107, 114, 128, 0.08);
    color: rgb(55, 65, 81);
}

.contact-profession[data-profession*="handwerker" i],
.contact-profession[data-profession*="handyman" i] {
    background: rgba(31, 120, 253, 0.08);
    color: rgb(2, 98, 245);
}

.contact-notes {
    color: rgba(60, 60, 60, 0.6);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    justify-content: flex-end;
}

.contact-action-btn {
    background: transparent;
    border: none;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

.contact-action-btn:hover {
    background: rgba(0,0,0,0.05);
}

.contact-action-btn .material-icons-outlined {
    font-size: 18px;
    color: rgba(60, 60, 60, 0.5);
}

.contact-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.08);
}

.contact-action-btn.delete:hover .material-icons-outlined {
    color: rgb(220, 38, 38);
}

/* Empty State */
.contacts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.contacts-empty .material-icons-outlined {
    font-size: 72px;
    color: rgba(60,60,60,0.25);
    margin-bottom: 20px;
}

.contacts-empty p {
    font-size: 15px;
    font-weight: 500;
    color: rgba(60,60,60,0.5);
    margin: 0 0 20px 0;
}

.add-first-contact-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
}

.add-first-contact-btn:hover {
    background-color: rgb(40, 40, 40);
    transform: translateY(-1px);
}

/* Calendar View */
.calendar-view {
    flex: 1;
    overflow: hidden;
    background-color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.calendar-container {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
}

/* Calendar Sidebar - Month View */
.calendar-sidebar {
    background-color: #fafafa;
    border-right: 1px solid rgba(0,0,0,0.06);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    max-height: 100%;
}

.month-selector {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.event-details-view {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.event-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0,0,0,0.02);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.event-details-header h4 {
    font-size: 11px;
    font-weight: 600;
    color: rgba(60,60,60,0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.close-event-details {
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-event-details:hover {
    background-color: rgba(0,0,0,0.04);
}

.close-event-details .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.6);
}

.event-details-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
}

.event-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.event-detail-description {
    font-size: 14px;
    color: rgba(60,60,60,0.65);
    margin-bottom: 20px;
    line-height: 1.5;
}

.event-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.event-detail-item:last-of-type {
    border-bottom: none;
}

.event-detail-time,
.event-detail-date,
.event-detail-attendees,
.event-detail-notes {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.event-detail-notes {
    border-bottom: none;
}

.event-detail-time .material-icons-outlined,
.event-detail-date .material-icons-outlined,
.event-detail-attendees .material-icons-outlined,
.event-detail-notes .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.4);
    margin-top: 1px;
    flex-shrink: 0;
}

.event-detail-time .time-text,
.event-detail-date .date-text {
    font-size: 14px;
    color: var(--main-color);
    font-weight: 500;
}

.attendees-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attendee-item {
    font-size: 14px;
    color: rgba(60,60,60,0.85);
    display: flex;
    align-items: center;
    gap: 6px;
}

.attendee-item::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--main-blue);
    border-radius: 50%;
    flex-shrink: 0;
}

.notes-text {
    flex: 1;
    font-size: 14px;
    color: rgba(60,60,60,0.85);
    white-space: pre-wrap;
    line-height: 1.6;
}

.event-details-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(0,0,0,0.02);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.event-detail-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Figtree', sans-serif;
}

.edit-event-btn {
    background-color: var(--main-blue);
    color: white;
    border: none;
}

.edit-event-btn:hover {
    background-color: rgb(2, 98, 245);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(31, 120, 253, 0.25);
}

.edit-event-btn .material-icons-outlined {
    font-size: 18px;
    color: white;
}

.delete-event-btn {
    background-color: white;
    color: rgb(239, 68, 68);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.delete-event-btn:hover {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgb(239, 68, 68);
    transform: translateY(-1px);
}

.delete-event-btn .material-icons-outlined {
    font-size: 18px;
    color: rgb(239, 68, 68);
}

.month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.month-nav h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-color);
}

.month-prev, .month-next {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-prev:hover, .month-next:hover {
    background-color: rgba(0,0,0,0.04);
}

.month-prev .material-icons-outlined,
.month-next .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.7);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.month-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(60,60,60,0.5);
    padding: 8px 0;
    text-transform: uppercase;
}

.month-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(60,60,60,0.85);
    font-weight: 400;
}

.month-day:hover {
    background-color: rgba(0,0,0,0.04);
}

.month-day.today {
    background-color: var(--main-blue);
    color: white;
    font-weight: 600;
}

.month-day.selected {
    background-color: rgba(31, 120, 253, 0.15);
    color: var(--main-blue);
    font-weight: 600;
}

.month-day.other-month {
    color: rgba(60,60,60,0.3);
}

.month-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background-color: var(--main-blue);
    border-radius: 50%;
}

/* Calendar Main Content */
.calendar-main-content {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

/* Week View */
.week-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.week-range {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
}

.week-prev, .week-next, .day-prev, .day-next {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-prev:hover, .week-next:hover,
.day-prev:hover, .day-next:hover {
    background-color: rgba(0,0,0,0.04);
}

.today-btn, .back-to-week-btn {
    background-color: white;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Figtree', sans-serif;
}

.today-btn:hover, .back-to-week-btn:hover {
    background-color: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.2);
}

.week-grid-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.week-time-column {
    width: 60px;
    border-right: 1px solid rgba(0,0,0,0.06);
    background-color: #fafafa;
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    pointer-events: none; /* Prevent user scrolling */
}

.week-time-column::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.week-time-column * {
    pointer-events: none; /* Prevent user scrolling on children */
}

.time-header {
    height: 60px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.time-slot {
    height: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 4px 8px;
    font-size: 11px;
    color: rgba(60,60,60,0.5);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.week-days-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    overflow-y: auto;
}

.week-day-column {
    border-right: 1px solid rgba(0,0,0,0.06);
    position: relative;
}

.week-day-column:last-child {
    border-right: none;
}

.week-day-header {
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background-color: var(--main-color-ultra-light) !important;
    z-index: 100;
    position: sticky;
    top: 0;
}

.week-day-name {
    font-size: 11px;
    font-weight: 600;
    color: rgba(60,60,60,0.5);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.week-day-number {
    font-size: 20px;
    font-weight: 600;
    color: rgba(60,60,60,0.85);
}

.week-day-header.today .week-day-number {
    background-color: var(--main-blue);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.week-day-header.selected {
    background-color: rgba(31, 120, 253, 0.08);
}

.week-day-header.selected .week-day-number {
    background-color: rgba(31, 120, 253, 0.15);
    color: var(--main-blue);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.week-day-slots {
    position: relative;
}

.week-hour-slot {
    height: 60px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    position: relative;
    cursor: pointer;
}

.week-hour-slot:hover {
    background-color: rgba(0,0,0,0.01);
}

/* Calendar Events */
.calendar-event {
    position: absolute;
    left: 2px;
    right: 2px;
    background-color: var(--main-blue);
    color: white;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: grab;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.15s ease;
    user-select: none;
    z-index: 1;
}

.calendar-event:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.calendar-event.dragging {
    opacity: 0.7;
    z-index: 50;
    cursor: grabbing !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.event-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time {
    font-size: 11px;
    opacity: 0.9;
}

.event-resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
}

.event-resize-handle::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 2px;
}

/* Day View */
.day-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.day-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.day-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
}

.day-grid-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.day-time-column {
    width: 60px;
    border-right: 1px solid rgba(0,0,0,0.06);
    background-color: #fafafa;
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    pointer-events: none; /* Prevent user scrolling */
}

.day-time-column::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.day-time-column * {
    pointer-events: none; /* Prevent user scrolling on children */
}

.day-events-grid {
    flex: 1;
    overflow-y: auto;
    position: relative;
    background-color: white;
    min-height: 0;
    max-height: 100%;
}

.day-events-grid > * {
    min-height: 1440px; /* 24 hours * 60px */
}

.week-day-slots {
    position: relative;
    min-height: 1440px; /* 24 hours * 60px */
}

/* AI Chat Panel */
.ai-chat-panel {
    background-color: white;
    border-left: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
    max-height: 100vh;
    position: relative;
}

.chat-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 16px 20px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.chat-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-history-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--main-color);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Figtree', sans-serif;
}

.chat-history-btn:hover {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.12);
}

.chat-history-btn .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.6);
}

.chat-history-btn .chevron {
    margin-left: auto;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.chat-history-btn.active .chevron {
    transform: rotate(180deg);
}

.chat-history-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.new-chat-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-chat-btn:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.12);
}

.new-chat-btn .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.6);
}

.chat-history-dropdown {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    margin: 0 16px;
}

.chat-history-dropdown.show {
    display: flex;
}

.chat-history-search {
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-history-search .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.4);
}

.chat-history-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    font-family: 'Figtree', sans-serif;
    color: var(--main-color);
    background: transparent;
}

.chat-history-search-input::placeholder {
    color: rgba(60,60,60,0.4);
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}

.chat-history-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.chat-history-item:hover {
    background: rgba(0,0,0,0.04);
}

.chat-history-item.active {
    background: rgba(0,0,0,0.06);
}

.chat-history-item:last-child {
    border-bottom: none;
}

.chat-history-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--main-color);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-history-item-preview {
    font-size: 12px;
    color: rgba(60,60,60,0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-history-item-time {
    font-size: 11px;
    color: rgba(60,60,60,0.4);
    margin-top: 4px;
}

.chat-history-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(60,60,60,0.4);
    font-size: 13px;
}

.ai-icon {
    width: 56px;
    height: 56px;
    background-color: rgba(0,0,0,0.04);
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    will-change: background-image;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.ai-icon .material-icons-outlined {
    font-size: 24px;
    color: rgba(60,60,60,0.7);
}

.chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-greeting {
    text-align: left;
}

.chat-greeting p {
    font-size: 15px;
    font-weight: 400;
    color: rgba(60,60,60,0.85);
    line-height: 1.5;
    padding: 0;
    margin: 0;
}

.chat-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-section-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(60,60,60,0.5);
    padding: 0;
    margin-bottom: 2px;
}

.chat-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.12s ease;
    font-size: 14px;
    font-weight: 400;
    color: rgba(60,60,60,0.85);
    text-align: left;
    font-family: 'Figtree', sans-serif;
}

.chat-action-item:hover {
    background-color: rgba(0,0,0,0.04);
    padding: 8px 8px;
    margin: 0 -8px;
}

.chat-action-item .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.5);
}

.chat-input-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background-color: white;
}

.chat-input-container.has-files {
    padding-top: 8px;
}

.chat-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    margin-bottom: 8px;
}

.chat-file-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(31, 120, 253, 0.1);
    border: 1px solid rgba(31, 120, 253, 0.2);
    border-radius: 8px;
    padding: 6px 8px 6px 10px;
    transition: all 0.15s ease;
}

.chat-file-tag:hover {
    background: rgba(31, 120, 253, 0.15);
    border-color: rgba(31, 120, 253, 0.3);
}

.chat-file-icon {
    font-size: 18px;
    color: var(--main-blue);
}

.chat-file-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--main-color);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-file-remove {
    background: transparent;
    border: none;
    padding: 2px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.chat-file-remove:hover {
    background-color: rgba(239, 68, 68, 0.15);
}

.chat-file-remove .material-icons-outlined {
    font-size: 16px;
    color: rgba(60,60,60,0.5);
}

.chat-file-remove:hover .material-icons-outlined {
    color: rgb(239, 68, 68);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.chat-input {
    flex: 1;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13px;
    font-family: 'Figtree', sans-serif;
    outline: none;
    transition: all 0.15s ease;
    background-color: white;
    margin-right: 8px;
    resize: none; /* Disable manual resizing */
    overflow-y: hidden; /* Hide scrollbar initially */
    line-height: 1.5;
    max-height: 150px; /* Limit max height */
}

.chat-input:hover {
    border-color: rgba(0,0,0,0.18);
}

.chat-input:focus {
    border-color: rgba(0, 122, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.08);
}

.chat-input::placeholder {
    color: rgba(60,60,60,0.4);
}

.chat-input-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-action-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-action-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

.input-action-btn .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.5);
}

.input-action-btn .input-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(60,60,60,0.6);
    font-family: 'Figtree', sans-serif;
    padding: 0 4px;
}

.send-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

.send-btn .material-icons-outlined {
    font-size: 18px;
    color: rgba(0,122,255,0.8);
}

/* Chat Messages */
.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    animation: messageSlideIn 0.3s ease;
    max-width: 100%;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user-message {
    flex-direction: row-reverse;
    align-self: flex-end;
    margin-left: auto;
    font-size: 14px;
}

.chat-message.ai-message {
    flex-direction: row;
    align-self: flex-start;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
}

.user-message .message-content {
    align-items: flex-end;
}

.ai-message .message-content {
    align-items: flex-start;
}

.message-time {
    font-size: 11px;
    color: rgba(60,60,60,0.5);
    padding: 0 4px;
    white-space: nowrap;
}

.user-message .message-time {
    text-align: right;
    color: rgba(60,60,60,0.5);
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--main-color-ultra-light);
    flex-shrink: 0;
    will-change: background-image;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.message-bubble {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 14px;
    position: relative;
    word-break: normal;
    overflow-wrap: break-word;
    text-align: left;
}

.user-message .message-bubble {
    background: var(--main-color);
    color: white;
    border-bottom-right-radius: 6px;
    font-size: 14px;
    font-weight: 400;
}

/* Confirmation message styling */
.user-message.confirmation-message .message-bubble {
    background: rgba(34, 197, 94, 0.12);
    color: rgb(21, 128, 61);
    font-weight: 500;
}

.ai-message .message-bubble {
    background: rgba(0,0,0,0.05);
    color: var(--main-color);
    border-bottom-left-radius: 6px;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
}

.message-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.user-message .message-files {
    align-items: flex-end;
}

.ai-message .message-files {
    align-items: flex-start;
}

.message-file-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    max-width: 250px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.user-message .message-file-item {
    background: rgba(255, 255, 255, 0.2);
    color: var(--main-color);
}

.user-message .message-file-item:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-message .message-file-item {
    background: rgba(0,0,0,0.06);
    color: var(--main-color);
}

.ai-message .message-file-item:hover {
    background: rgba(0,0,0,0.09);
}

.message-file-item .material-icons-outlined {
    font-size: 18px;
    flex-shrink: 0;
}

.user-message .message-file-item .material-icons-outlined {
    color: var(--main);
}

.ai-message .message-file-item .material-icons-outlined {
    color: var(--main-blue);
}

.message-file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Thinking Animation */
.thinking-bubble {
    background: rgba(0,0,0,0.04);
    padding: 14px 20px;
}

.thinking-bubble-history {
    background: rgba(0,0,0,0.05);
    padding: 10px 16px;
    border-left: none;
    border-radius: 14px;
    border-bottom-left-radius: 6px;
}

.thinking-bubble-history .phase-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(60,60,60,0.7);
}

.tool-bubble-history {
    background: rgba(0,0,0,0.05);
    padding: 10px 16px;
    border-left: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    border-bottom-left-radius: 6px;
}

.tool-bubble-history .tool-icon {
    font-size: 16px;
    color: rgba(59, 130, 246, 0.8);
}

.tool-bubble-history .tool-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(60,60,60,0.7);
}

.phase-bubble {
    display: flex;
    align-items: center;
    gap: 12px;
}

.phase-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(60,60,60,0.7);
}

.thinking-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background: rgba(60,60,60,0.4);
    border-radius: 50%;
    animation: thinkingBounce 1.4s infinite ease-in-out;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinkingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Message Reason - Minimal inline style */
.message-reason {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(60,60,60,0.45);
    line-height: 1.4;
}

/* Reasoning Container */
.message-reasoning-container {
    margin-top: 8px;
}

.thinking-label {
    font-size: 12px;
    color: rgba(60,60,60,0.4);
    margin-bottom: 4px;
    font-weight: 400;
}

.reasoning-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(60,60,60,0.4);
    cursor: pointer;
    transition: color 0.15s ease;
    font-family: 'Figtree', sans-serif;
}

.reasoning-toggle:hover {
    color: rgba(60,60,60,0.65);
}

.reasoning-toggle:hover .chevron {
    color: rgba(60,60,60,0.65);
}

.reasoning-toggle .material-icons-outlined {
    font-size: 16px;
}

.reasoning-toggle .chevron {
    font-size: 16px;
    transition: all 0.2s ease;
    color: rgba(60,60,60,0.4);
}

.message-reasoning {
    margin-top: 6px;
    padding: 0;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(60,60,60,0.5);
    font-family: inherit;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    transition: all 0.25s ease;
    opacity: 1;
}

.message-reasoning.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
}

.message-reasoning::-webkit-scrollbar {
    width: 4px;
}

.message-reasoning::-webkit-scrollbar-track {
    background: transparent;
}

.message-reasoning::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

.message-reasoning::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

/* Info Notifications - ChatGPT Style */
.info-notification {
    margin: 10px auto;
    padding: 10px 14px;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.2s ease;
    max-width: 500px;
}

.info-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Email Context Card in Chat - Matches chat styling */
.email-context-card {
    margin: 8px 0;
    padding: 0;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    overflow: hidden;
    max-width: 100%;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s ease;
    animation: messageSlideIn 0.3s ease forwards;
}

.email-context-card.show {
    opacity: 1;
    transform: translateY(0);
}

.email-context-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.02);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.email-context-header .material-icons-outlined {
    font-size: 16px;
    color: rgba(60, 60, 60, 0.4);
}

.email-context-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(60, 60, 60, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-context-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-context-field {
    display: flex;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.email-context-label {
    font-weight: 600;
    color: rgba(60, 60, 60, 0.45);
    min-width: 55px;
    flex-shrink: 0;
}

.email-context-value {
    color: rgba(60, 60, 60, 0.75);
    flex: 1;
}

.email-context-value.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.info-notification-header:hover .info-notification-text {
    color: rgba(60,60,60,0.8);
}

.info-notification-header .material-icons-outlined {
    font-size: 16px;
    color: rgba(34, 197, 94, 0.8);
}

.info-notification-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(60,60,60,0.6);
    flex: 1;
    transition: color 0.15s ease;
}

.info-notification-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(60,60,60,0.4);
    transition: color 0.15s ease;
}

.info-notification-header:hover .info-notification-toggle {
    color: rgba(60,60,60,0.6);
}

.info-notification-toggle .material-icons-outlined {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.info-notification-toggle.expanded .material-icons-outlined {
    transform: rotate(180deg);
}

.info-notification-content {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 12px;
    line-height: 1.6;
    color: rgba(60,60,60,0.6);
    white-space: pre-wrap;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.25s ease;
}

.info-notification-content.expanded {
    max-height: 300px;
    opacity: 1;
    overflow-y: auto;
}

.info-notification-content::-webkit-scrollbar {
    width: 4px;
}

.info-notification-content::-webkit-scrollbar-track {
    background: transparent;
}

.info-notification-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

/* Rotating icon animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotate 1s linear infinite;
}

/* UI Modal */
.ui-overlay,
.ui-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ui-overlay.show,
.ui-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.ui-modal {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.08);
    overflow: hidden;
    transform: translateY(8px);
    opacity: 0;
    transition: all 0.18s ease;
}

.ui-modal.show {
    transform: translateY(0);
    opacity: 1;
}

.ui-modal-header {
    padding: 16px 16px 8px 16px;
}

.ui-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-color);
}

.ui-modal-body {
    padding: 0 16px 16px 16px;
    color: rgba(60,60,60,0.85);
    font-size: 14px;
}

.ui-modal-input,
.ui-modal-textarea {
    width: 100%;
    margin-top: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.15s ease;
    background-color: white;
    font-family: 'Figtree', sans-serif;
}

.ui-modal-textarea {
    resize: vertical;
    min-height: 80px;
}

.ui-modal-input:focus,
.ui-modal-textarea:focus {
    border-color: rgba(0, 122, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.08);
}

.ui-form-field {
    margin-bottom: 14px;
}

.ui-form-field:last-child {
    margin-bottom: 0;
}

.ui-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 6px;
}

.ui-form-hint {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
    margin-top: 4px;
}

.ui-attendee-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ui-attendee-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(31, 120, 253, 0.1);
    color: var(--main-blue);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.ui-attendee-remove {
    cursor: pointer;
    padding: 2px;
    margin: -2px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.ui-attendee-remove:hover {
    background: rgba(0,0,0,0.1);
}

.ui-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px 16px 16px;
}

.ui-btn {
    appearance: none;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    color: var(--main-color);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ui-btn:hover {
    background-color: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.2);
}

.ui-btn.primary {
    background: var(--main-blue);
    border-color: var(--main-blue);
    color: #fff;
}

.ui-btn.primary .material-icons-outlined {
    color: white;
}

.ui-btn.primary:hover {
    background: rgb(2, 98, 245);
    border-color: rgb(2, 98, 245);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.08);
    padding: 6px;
    min-width: 180px;
    z-index: 10001;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
}

/* Label Picker */
.label-picker-overlay {
    z-index: 10020 !important; /* above context menu */
}

.label-picker-modal {
    max-width: 500px;
    width: 90%;
}

.label-picker-modal .ui-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 12px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.label-picker-modal .ui-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--main-color);
}

.label-picker-modal .ui-modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(60,60,60,0.6);
    transition: all 0.15s ease;
}

.label-picker-modal .ui-modal-close:hover {
    background: rgba(0,0,0,0.05);
    color: var(--main-color);
}

.label-picker-modal .ui-modal-body {
    padding: 16px 20px;
}

.label-picker-modal .label-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.label-picker-modal .label-search input {
    flex: 1;
    margin-top: 0;
}

.label-picker-modal .create-new-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 14px;
    background: white;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 40px;
    flex-shrink: 0;
}

.label-picker-modal .create-new-label .material-icons-outlined {
    font-size: 16px;
}

.label-picker-modal .labels-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 4px;
    background: #fafafa;
}

.label-picker-modal .labels-list .empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(60,60,60,0.5);
    font-size: 14px;
}

.label-row {
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.15s ease;
    margin-bottom: 2px;
    background: white;
}

.label-row:hover {
    background: rgba(31, 120, 253, 0.05);
}

.label-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.label-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.label-checkbox .name {
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
}

.label-row .desc {
    margin-left: 38px;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(60,60,60,0.6);
    line-height: 1.4;
}

.label-picker-modal .ui-modal-actions {
    padding: 12px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background: #fafafa;
}

.label-picker-modal .create-label-form {
    background: white;
}

.label-picker-modal .create-label-form .form-group {
    margin-bottom: 18px;
}

.label-picker-modal .create-label-form .form-group:last-of-type {
    margin-bottom: 0;
}

.label-picker-modal .create-label-form label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Color Picker - Minimal Apple/Notion Style */
.custom-color-picker {
    background: transparent;
    padding: 0;
}

.color-presets-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.color-preset-btn {
    width: 100%;
    aspect-ratio: 1;
    min-width: 40px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    padding: 0;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
}

.color-preset-btn:hover {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
}

.color-preset-btn.active {
    border-color: rgba(0,0,0,0.15);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
}

.color-preset-btn.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.95);
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.color-selected-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fafafa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

.selected-color-preview {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.selected-color-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    outline: none;
    letter-spacing: 0.5px;
}

.custom-color-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.custom-color-btn .material-icons-outlined {
    color: #666;
    font-size: 18px;
}

.custom-color-btn:hover {
    background: #f5f5f5;
    border-color: rgba(0,0,0,0.15);
}

.custom-color-btn:active {
    background: #ececec;
}

.native-color-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.form-actions-inline {
    margin-top: 20px;
}

.ui-create-label {
    width: 100%;
    padding: 10px 16px;
    background: #2d2d2d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ui-create-label:hover {
    background: #1a1a1a;
}

.ui-create-label:active {
    background: #0a0a0a;
}

.label-picker-modal .create-new-label:hover {
    background-color: rgba(0,0,0,0.05);
}

.label-picker-modal .create-new-label:active {
    background-color: rgba(0,0,0,0.08);
}

.context-menu.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--main-color);
    cursor: pointer;
    transition: background-color 0.12s ease;
    user-select: none;
}

.context-menu-item:hover {
    background-color: rgba(0,0,0,0.05);
}

.context-menu-item .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.6);
}

.context-menu-item.danger {
    color: rgb(239, 68, 68);
}

.context-menu-item.danger .material-icons-outlined {
    color: rgb(239, 68, 68);
}

.context-menu-item.danger:hover {
    background-color: rgba(239, 68, 68, 0.08);
}

.context-menu-divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 6px 0;
}

/* File Upload Modal */
.file-upload-area {
    border: 2px dashed rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    background-color: rgba(0,0,0,0.02);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--main-blue);
    background-color: rgba(31, 120, 253, 0.03);
}

.file-upload-area.drag-over {
    border-color: var(--main-blue);
    background-color: rgba(31, 120, 253, 0.08);
    border-width: 3px;
}

.file-upload-icon {
    margin-bottom: 16px;
}

.file-upload-icon .material-icons-outlined {
    font-size: 64px;
    color: rgba(60,60,60,0.3);
    transition: color 0.2s ease;
}

.file-upload-area:hover .file-upload-icon .material-icons-outlined,
.file-upload-area.drag-over .file-upload-icon .material-icons-outlined {
    color: var(--main-blue);
}

.file-upload-text {
    margin-bottom: 12px;
}

.file-upload-primary {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 6px;
}

.file-upload-secondary {
    font-size: 14px;
    color: rgba(60,60,60,0.6);
}

.file-upload-types {
    font-size: 12px;
    color: rgba(60,60,60,0.5);
}

.file-input-hidden {
    display: none;
}

.file-list {
    display: none;
    margin-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: rgba(0,0,0,0.02);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background-color 0.15s ease;
}

.file-item:hover {
    background-color: rgba(0,0,0,0.04);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item-icon {
    font-size: 32px;
    color: var(--main-blue);
    flex-shrink: 0;
}

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

.file-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.file-item-size {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
}

.file-item-remove {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item-remove:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.file-item-remove .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.5);
}

.file-item-remove:hover .material-icons-outlined {
    color: rgb(239, 68, 68);
}

/* Compose Email View & Reply View */
.compose-view,
.reply-view {
    display: none;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    background-color: white;
    height: 100%;
}

/* Compose Email Modal */
.compose-modal {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.compose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background-color: white;
}

.compose-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compose-back-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.compose-back-btn:hover {
    background-color: rgba(0,0,0,0.04);
}

.compose-back-btn .material-icons-outlined {
    font-size: 22px;
    color: rgba(60,60,60,0.7);
}

.compose-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0;
}

.compose-close-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.compose-close-btn:hover {
    background-color: rgba(0,0,0,0.06);
}

.compose-close-btn .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.6);
}

.compose-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.compose-field {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0 24px;
    min-height: 52px;
    transition: background-color 0.15s ease;
}

.compose-field:hover {
    background-color: rgba(0,0,0,0.01);
}

.compose-field:focus-within {
    background-color: rgba(0,0,0,0.02);
}

.compose-field label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(60,60,60,0.6);
    min-width: 80px;
    user-select: none;
}

.compose-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0 14px 0;
    font-size: 15px;
    font-family: 'Figtree', sans-serif;
    color: var(--main-color);
    background: transparent;
}

.compose-input::placeholder {
    color: rgba(60,60,60,0.35);
}

.compose-input:read-only {
    color: rgba(60,60,60,0.6);
    cursor: not-allowed;
}

.compose-editor-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 24px;
    min-height: 0;
}

.compose-textarea {
    border: none;
    outline: none;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    font-family: 'Figtree', sans-serif;
    color: var(--main-color);
    background: transparent;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.compose-textarea::placeholder {
    color: rgba(60,60,60,0.35);
}

/* Original Email Thread in Reply */
.original-email-thread {
    flex: 0 0 auto;
    max-height: 40%;
    overflow-y: auto;
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 24px;
}

.thread-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.thread-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,0.1);
}

.thread-divider-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(60,60,60,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thread-email {
    background-color: rgba(0,0,0,0.02);
    border-radius: 12px;
    padding: 20px;
}

.thread-email-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.thread-from {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.thread-time {
    font-size: 13px;
    color: rgba(60,60,60,0.6);
    white-space: nowrap;
}

.thread-email-subject {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 16px;
    line-height: 1.4;
}

.thread-email-body {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(60,60,60,0.85);
}

.thread-email-body p {
    margin-bottom: 16px;
}

.thread-email-body p:last-child {
    margin-bottom: 0;
}

/* Email Thread View */
.email-thread-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: rgba(0,0,0,0.01);
}

.thread-message {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.thread-message:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.thread-message-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.thread-from {
    display: flex;
    align-items: center;
    gap: 12px;
}

.thread-message-body {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(60,60,60,0.85);
    word-wrap: break-word;
}

.thread-message-body p {
    margin-bottom: 12px;
}

.thread-message-body p:last-child {
    margin-bottom: 0;
}

.thread-info {
    flex: 1;
    margin: 0 16px;
}

.thread-subject {
    font-size: 18px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 4px;
}

.thread-count-info {
    font-size: 13px;
    color: rgba(60,60,60,0.6);
    font-weight: 500;
}

.thread-time {
    font-size: 13px;
    color: rgba(60,60,60,0.5);
    white-space: nowrap;
}

.compose-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(0,0,0,0.02);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.compose-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
}

.compose-tool-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.compose-tool-btn:hover {
    background-color: rgba(0,0,0,0.06);
}

.compose-tool-btn .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.6);
}

.compose-send-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compose-discard-btn {
    color: rgba(60,60,60,0.7);
}

.compose-send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.compose-send-btn .material-icons-outlined {
    font-size: 18px;
    color: white;
}

/* Circular spinner loader for send button */
.compose-send-btn .spinner-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
}

.compose-send-btn .spinner-loader::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spinnerRotate 0.8s linear infinite;
}

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Email Settings Modal Styles */
.email-settings-modal {
    max-width: 600px;
    width: 90%;
}

.email-settings-modal .ui-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.email-settings-modal .ui-modal-close {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: rgba(60,60,60,0.6);
}

.email-settings-modal .ui-modal-close:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--main-color);
}

.email-settings-modal .ui-modal-close .material-icons-outlined {
    font-size: 20px;
}

.email-settings-modal .ui-modal-body {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.settings-section .form-group {
    margin-bottom: 16px;
}

.settings-section .form-group:last-child {
    margin-bottom: 0;
}

.email-settings-modal .ui-modal-actions {
    padding: 16px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background-color: #fafafa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.email-settings-modal .ui-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.email-settings-modal .ui-save:disabled {
    background-color: rgba(31, 120, 253, 0.5);
    border-color: rgba(31, 120, 253, 0.5);
}

.settings-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
}

.status-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.status-icon.connected {
    color: rgb(34, 197, 94);
}

.status-text {
    flex: 1;
}

.status-title {
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 4px;
    font-size: 15px;
}

.status-email {
    font-size: 13px;
    color: rgba(60,60,60,0.8);
    margin-bottom: 2px;
}

.status-sync {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
}

.status-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.sync-now-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.process-emails-btn {
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(31, 120, 253, 0.1);
    color: var(--main-blue);
    border: 1px solid rgba(31, 120, 253, 0.3);
}

.process-emails-btn:hover {
    background: rgba(31, 120, 253, 0.15);
}

.process-emails-btn .material-icons-outlined {
    font-size: 18px;
}

.settings-divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 20px 0;
}

.provider-select {
    width: 100%;
    cursor: pointer;
}

.provider-instructions {
    margin-top: 0;
}

.provider-instructions[style*="display: none"],
.provider-fields[style*="display: none"] {
    display: none !important;
    height: 0;
    overflow: hidden;
}

.instructions-box {
    background: rgba(31, 120, 253, 0.05);
    border: 1px solid rgba(31, 120, 253, 0.15);
    border-radius: 8px;
    padding: 14px;
    margin: 16px 0;
}

.instructions-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--main-blue);
    margin-bottom: 10px;
    font-size: 14px;
}

.instructions-title .material-icons-outlined {
    font-size: 20px;
}

.instructions-content {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(60,60,60,0.85);
}

.provider-fields {
    margin-top: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row .form-group.small {
    flex: 0 0 100px;
}

.email-settings-modal .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(60,60,60,0.8);
    margin-bottom: 6px;
}

.email-settings-modal .ui-form-hint {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
    margin-top: 4px;
}

.advanced-settings {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: rgba(60,60,60,0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.15s ease;
    font-family: 'Figtree', sans-serif;
}

.advanced-toggle:hover {
    color: var(--main-color);
}

.advanced-toggle .material-icons-outlined {
    font-size: 20px;
}

.advanced-fields {
    margin-top: 12px;
    padding-top: 12px;
}

.test-connection-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.test-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.test-btn .material-icons-outlined {
    font-size: 18px;
}

.test-result {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    flex: 1;
}

.test-result .material-icons-outlined {
    font-size: 18px;
}

.test-result.success {
    background: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
}

.test-result.error {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
}

.email-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    min-width: 260px;
    max-width: 400px;
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
}

.email-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.email-notification.success {
    background: linear-gradient(135deg, rgba(31, 120, 253, 0.05) 0%, rgba(31, 120, 253, 0.08) 100%);
    border-color: rgba(31, 120, 253, 0.2);
}

.email-notification.success .material-icons-outlined {
    color: var(--main-blue);
}

.email-notification.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.email-notification.error .material-icons-outlined {
    color: rgb(220, 38, 38);
}

.email-notification .material-icons-outlined {
    font-size: 22px;
    flex-shrink: 0;
}

.thread-count {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
    font-weight: 500;
    padding: 2px 8px;
    background: rgba(60,60,60,0.08);
    border-radius: 10px;
    white-space: nowrap;
    margin-left: 8px;
    display: inline-block;
}

.unread-indicator {
    width: 8px;
    height: 8px;
    background: var(--main-blue);
    border-radius: 50%;
}

.email-meta .email-time {
    font-size: 12px;
    color: rgba(60,60,60,0.6);
    margin-left: auto;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar,
.email-list::-webkit-scrollbar,
.chat-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.email-list::-webkit-scrollbar-track,
.chat-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.email-list::-webkit-scrollbar-thumb,
.chat-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.email-list::-webkit-scrollbar-thumb:hover,
.chat-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* Email Assistant Popup - Modern Minimal Design */
.email-assistant-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: none;
    display: none;
    z-index: 10050;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.email-assistant-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: none; /* Keep background clickable */
}

.email-assistant-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all; /* Popup captures clicks */
}

.email-assistant-overlay.active .email-assistant-popup {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close button */
.email-assistant-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.email-assistant-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.email-assistant-close .material-icons-outlined {
    font-size: 18px;
    color: rgba(60, 60, 60, 0.5);
}

/* Header with avatar and badge */
.email-assistant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.email-assistant-avatar {
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    will-change: background-image;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.email-assistant-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(31, 120, 253, 0.1) 0%, rgba(31, 120, 253, 0.15) 100%);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--main-blue);
    letter-spacing: 0.3px;
}

/* Email content */
.email-assistant-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-from-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.email-from-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--main-color);
    line-height: 1.3;
}

.email-from-email {
    font-size: 13px;
    color: rgba(60, 60, 60, 0.5);
    line-height: 1.3;
}

.email-subject {
    font-size: 14px;
    font-weight: 500;
    color: var(--main-color);
    line-height: 1.4;
    margin-top: 4px;
}

.email-summary {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(60, 60, 60, 0.65);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Actions */
.email-assistant-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px 20px 20px;
}

.assistant-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Figtree', sans-serif;
    border: none;
    white-space: nowrap;
}

.assistant-btn .material-icons-outlined {
    font-size: 18px;
}

.assistant-btn-primary {
    background: var(--main-color);
    color: white;
}

.assistant-btn-primary:hover {
    background: rgb(40, 40, 40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.assistant-btn-primary .material-icons-outlined {
    color: white;
}

.assistant-btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(60, 60, 60, 0.85);
}

.assistant-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.assistant-btn:active {
    transform: scale(0.98);
}

.assistant-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}


/* Tablet/Small Laptop - Tables between sidebars */
@media screen and (max-width: 1500px) {
    /* Reduce container padding for more space */
    .contacts-table-container,
    .customers-table-container {
        padding: 0 24px 24px 24px;
    }
    
    .table-search-container {
        padding: 16px 24px;
    }
    
    /* Reduce table column sizes for smaller screens */
    .customers-table .col-name {
        width: 15%;
        min-width: 100px;
        max-width: 130px;
    }
    
    .customers-table .col-email {
        width: 18%;
        min-width: 120px;
        max-width: 160px;
    }
    
    .customers-table .col-phone {
        width: 12%;
        min-width: 90px;
        max-width: 110px;
    }
    
    .customers-table .col-address {
        width: 20%;
        min-width: 100px;
        max-width: 180px;
    }
    
    .customers-table .col-notes {
        width: 20%;
        min-width: 90px;
        max-width: 150px;
    }
    
    /* Contacts table */
    .contacts-table .col-name {
        width: 18%;
        min-width: 100px;
        max-width: 130px;
    }
    
    .contacts-table .col-email {
        width: 22%;
        min-width: 120px;
        max-width: 170px;
    }
    
    .contacts-table .col-profession {
        width: 16%;
        min-width: 90px;
        max-width: 120px;
    }
    
    .contacts-table .col-notes {
        width: 29%;
        min-width: 100px;
        max-width: 200px;
    }
    
    /* Make table text slightly smaller */
    .customers-table td,
    .contacts-table td {
        font-size: 13px;
    }
    
    .customers-table th,
    .contacts-table th {
        font-size: 11px;
    }
}

/* Very compact screens (13" laptops) */
@media screen and (max-width: 1366px) {
    /* Even tighter padding */
    .contacts-table-container,
    .customers-table-container {
        padding: 0 20px 20px 20px;
    }
    
    .contacts-header,
    .customers-header {
        padding: 20px 20px;
    }
    
    .table-search-container {
        padding: 12px 20px;
    }
    
    .customers-table .col-name {
        width: 14%;
        max-width: 110px;
    }
    
    .customers-table .col-email {
        width: 17%;
        max-width: 140px;
    }
    
    .customers-table .col-phone {
        width: 11%;
        max-width: 100px;
    }
    
    .customers-table .col-address {
        width: 19%;
        max-width: 150px;
    }
    
    .customers-table .col-notes {
        width: 19%;
        max-width: 130px;
    }
    
    .customers-table td,
    .contacts-table td {
        padding: 10px 10px;
    }
    
    .customers-table th,
    .contacts-table th {
        padding: 10px 10px 8px 10px;
    }
    
    /* Contacts table compact */
    .contacts-table .col-name {
        width: 17%;
        max-width: 120px;
    }
    
    .contacts-table .col-email {
        width: 21%;
        max-width: 150px;
    }
    
    .contacts-table .col-profession {
        width: 15%;
        max-width: 110px;
    }
    
    .contacts-table .col-notes {
        width: 32%;
        max-width: 180px;
    }
}

/* Mobile Responsiveness */
@media screen and (max-width: 1200px) {
    .dashboard-container {
        grid-template-columns: 240px 1fr;
    }

    .ai-chat-panel {
        display: none;
    }
    
    /* Email assistant notification responsive */
    .email-assistant-popup {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: 440px;
        margin: 0 auto;
    }
    
    /* Tables can expand more without right sidebar */
    .customers-table .col-name {
        width: 16%;
        max-width: 150px;
    }
    
    .customers-table .col-email {
        width: 20%;
        max-width: 180px;
    }
    
    .customers-table .col-address {
        width: 22%;
        max-width: 200px;
    }
    
    .customers-table .col-notes {
        width: 18%;
        max-width: 170px;
    }
    
    .contacts-table .col-name {
        width: 20%;
        max-width: 150px;
    }
    
    .contacts-table .col-email {
        width: 25%;
        max-width: 190px;
    }
    
    .contacts-table .col-notes {
        width: 27%;
        max-width: 220px;
    }
}

@media screen and (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .email-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .email-meta {
        flex-wrap: wrap;
    }

    .email-label {
        justify-self: start;
    }

    .email-detail-content {
        padding: 24px 16px;
    }

    .email-detail-subject {
        font-size: 20px;
    }

    .email-reply-box {
        padding: 12px 16px;
    }
    
    /* Email assistant for mobile */
    .email-assistant-popup {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .email-assistant-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .assistant-btn {
        width: 100%;
    }
    
    /* Email context card in chat */
    .email-context-card {
        max-width: 100%;
    }
    
    /* Contacts table responsive */
    .contacts-header {
        padding: 16px 20px;
    }
    
    .table-search-container {
        padding: 12px 20px;
    }
    
    .table-search-wrapper {
        max-width: 100%;
    }
    
    .table-search-input {
        font-size: 13px;
        padding: 9px 12px 9px 40px;
    }
    
    .table-search-wrapper .material-icons-outlined {
        font-size: 18px;
        left: 10px;
    }
    
    .autocomplete-preview {
        left: 40px;
        font-size: 13px;
    }
    
    .contacts-table-container {
        padding: 0 20px 24px 20px;
    }
    
    .contacts-table {
        font-size: 13px;
    }
    
    .contacts-table th,
    .contacts-table td {
        padding: 10px 10px;
    }
    
    .contacts-table .col-notes {
        max-width: 150px;
    }
    
    /* Customers table responsive */
    .customers-header {
        padding: 16px 20px;
    }
    
    .customers-table-container {
        padding: 0 20px 24px 20px;
    }
    
    .customers-table {
        font-size: 13px;
    }
    
    .customers-table th,
    .customers-table td {
        padding: 10px 10px;
    }
    
    .customers-table .col-address {
        max-width: 150px;
    }
    
    /* Settings responsive */
    .settings-header {
        padding: 16px 20px;
    }
    
    .settings-content {
        padding: 24px 20px;
    }
    
    .settings-section {
        margin-bottom: 32px;
    }
    
    .settings-section-title {
        font-size: 12px;
    }
    
    .settings-table-row {
        grid-template-columns: 1fr;
    }
    
    .label-cell {
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding: 10px 14px 8px 14px;
        font-size: 12px;
        color: rgba(60,60,60,0.5);
    }
    
    .value-cell {
        padding: 8px 14px 10px 14px;
        font-size: 14px;
    }
    
    .email-connection-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }
    
    .connection-icon {
        font-size: 24px;
    }
    
    .email-connection-actions {
        flex-direction: column;
        padding: 10px;
    }
    
    .email-connection-actions .ui-btn {
        width: 100%;
    }
}

/* Dotted circle loader for send button */
@keyframes spin-dots {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.send-btn .loader-dots {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px dotted currentColor;
	border-top-color: transparent;
	display: inline-block;
	animation: spin-dots 1s linear infinite;
}

/* keep rotating class for legacy cases (used elsewhere) */
@keyframes rotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
.rotating { animation: rotate 1s linear infinite; }

/* Onboarding Page Styles */
.onboarding-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--main-color-ultra-light);
    padding: 40px 20px;
    position: relative;
}

.onboarding-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 80px;
}

.progress-bar {
    flex: 1;
    max-width: 600px;
    height: 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--main-blue);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 16.66%; /* 1/6 steps */
}

.progress-text {
    font-size: var(--font-small);
    font-weight: 600;
    color: rgba(60,60,60,0.6);
    white-space: nowrap;
}

.progress-text .current-step {
    color: var(--main-color);
    font-weight: 700;
}

.onboarding-step {
    display: none;
    width: 100%;
    max-width: 560px;
    margin-top: 80px;
    animation: stepSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-step.active {
    display: block;
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.04);
    text-align: center;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background-color: rgba(0,0,0,0.04);
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: background-image;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.step-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 12px;
    line-height: 1.2;
}

.step-subtitle {
    font-size: var(--font-body);
    color: rgba(60,60,60,0.6);
    margin-bottom: 40px;
    line-height: 1.5;
}

.step-form {
    text-align: left;
    margin-bottom: 32px;
}

.step-form .form-group {
    margin-bottom: 20px;
}

.step-form .form-group:last-child {
    margin-bottom: 0;
}

.step-form label {
    display: block;
    font-size: var(--font-small);
    font-weight: 600;
    color: rgba(60,60,60,0.8);
    margin-bottom: 8px;
}

.optional-label {
    font-weight: 400;
    color: rgba(60,60,60,0.5);
    font-size: 13px;
}

.step-form .form-input {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: var(--font-body);
    outline: none;
    transition: all 0.15s ease;
    background-color: white;
    font-family: 'Figtree', sans-serif;
    color: var(--main-color);
}

.step-form .form-input:hover {
    border-color: rgba(0,0,0,0.2);
}

.step-form .form-input:focus {
    border-color: var(--main-blue);
    box-shadow: 0 0 0 3px rgba(31, 120, 253, 0.1);
}

.step-form .form-input::placeholder {
    color: rgba(60,60,60,0.35);
}

.step-form textarea.form-input {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.step-form select.form-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233c3c3c' stroke-opacity='0.6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Custom Dropdown Container */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 12px 40px 12px 16px;
    font-size: var(--font-body);
    outline: none;
    transition: all 0.15s ease;
    background-color: white;
    font-family: 'Figtree', sans-serif;
    color: var(--main-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    position: relative;
}

.custom-select-trigger:hover {
    border-color: rgba(0,0,0,0.2);
}

.custom-select-trigger.active {
    border-color: var(--main-blue);
    box-shadow: 0 0 0 3px rgba(31, 120, 253, 0.1);
}

.custom-select-trigger .placeholder {
    color: rgba(60,60,60,0.35);
}

.custom-select-trigger .selected-value {
    color: var(--main-color);
}

.custom-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s ease;
    width: 12px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233c3c3c' stroke-opacity='0.6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.custom-select-trigger.active .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.custom-select-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Open upward when not enough space below */
.custom-select-wrapper.open-upward .custom-select-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(10px);
}

.custom-select-wrapper.open-upward .custom-select-dropdown.active {
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-size: var(--font-body);
    color: rgba(60,60,60,0.85);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select-option:first-child {
    border-radius: 10px 10px 0 0;
}

.custom-select-option:last-child {
    border-radius: 0 0 10px 10px;
}

.custom-select-option:hover {
    background-color: rgba(0,0,0,0.04);
}

.custom-select-option.selected {
    background-color: rgba(31, 120, 253, 0.08);
    color: var(--main-blue);
    font-weight: 500;
}

.custom-select-option.selected::after {
    content: '✓';
    font-weight: 700;
    color: var(--main-blue);
}

.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

.form-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background: rgba(31, 120, 253, 0.06);
    border-radius: 8px;
    font-size: 13px;
    color: rgba(60,60,60,0.7);
    line-height: 1.5;
}

.form-hint .material-icons-outlined {
    font-size: 18px;
    color: var(--main-blue);
    flex-shrink: 0;
    margin-top: 1px;
}

.sample-email-card {
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.sample-email-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.04);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-size: var(--font-small);
    font-weight: 600;
    color: rgba(60,60,60,0.7);
}

.sample-email-header .material-icons-outlined {
    font-size: 18px;
    color: rgba(60,60,60,0.5);
}

.sample-email-content {
    padding: 16px;
    font-size: var(--font-small);
    line-height: 1.6;
}

.sample-from,
.sample-subject {
    margin-bottom: 8px;
    color: rgba(60,60,60,0.7);
    font-weight: 500;
}

.sample-subject {
    font-weight: 600;
    color: var(--main-color);
}

.sample-body {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
    color: rgba(60,60,60,0.85);
}

.review-card {
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    margin-bottom: 32px;
}

.review-section {
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.review-section:first-child {
    padding-top: 0;
}

.review-section:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.review-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(60,60,60,0.5);
    margin-bottom: 12px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: var(--font-small);
}

.review-key {
    color: rgba(60,60,60,0.6);
    font-weight: 500;
}

.review-value {
    color: var(--main-color);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.step-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
}

.btn-back,
.btn-continue,
.btn-finish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
    border: none;
    white-space: nowrap;
}

.btn-back {
    background: transparent;
    color: rgba(60,60,60,0.7);
    border: 1px solid rgba(0,0,0,0.12);
    min-width: 100px;
}

.btn-back:hover {
    background: rgba(0,0,0,0.04);
    color: var(--main-color);
    border-color: rgba(0,0,0,0.2);
}

.btn-continue,
.btn-finish {
    background: var(--main-blue);
    color: white;
    flex: 1;
}

.btn-continue:hover,
.btn-finish:hover {
    background: rgb(2, 98, 245);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 120, 253, 0.25);
}

.btn-continue:disabled,
.btn-finish:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-back .material-icons-outlined {
    font-size: 20px;
    color: rgba(60,60,60,0.6);
}

.btn-continue .material-icons-outlined,
.btn-finish .material-icons-outlined {
    font-size: 20px;
    color: white;
}

.skip-onboarding {
    position: fixed;
    top: 40px;
    transform: translateY(-50%);
    right: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: var(--font-small);
    font-weight: 500;
    color: rgba(60,60,60,0.6);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Figtree', sans-serif;
    z-index: 101;
}

.skip-onboarding:hover {
    background: rgba(0,0,0,0.04);
    color: var(--main-color);
}

.skip-onboarding .material-icons-outlined {
    font-size: 18px;
}

/* Authentication Pages Styles */
.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: white;
}

/* Left Side - Animation & Content */
.auth-left {
    background: linear-gradient(135deg, rgba(31, 120, 253, 0.05) 0%, rgba(31, 120, 253, 0.08) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
    position: relative;
}

.auth-brand {
    position: absolute;
    top: 40px;
    left: 60px;
}

.auth-brand h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--main-color);
    margin: 0;
}

.auth-animation {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 40px;
    width: 100%;
    max-width: 480px;
}

.auth-face {
    width: 120px;
    height: 120px;
    background-color: rgba(0,0,0,0.04);
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: background-image;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.auth-content {
    max-width: 480px;
    width: 100%;
}

.auth-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 16px;
    line-height: 1.2;
}

.auth-content p {
    font-size: var(--font-body);
    color: rgba(60,60,60,0.7);
    line-height: 1.6;
    margin-bottom: 40px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(60,60,60,0.85);
    font-weight: 500;
}

.auth-feature .material-icons-outlined {
    font-size: 24px;
    color: var(--main-blue);
}

/* Right Side - Form */
.auth-right {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 8px;
}

.auth-form-header p {
    font-size: var(--font-small);
    color: rgba(60,60,60,0.6);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label {
    font-size: var(--font-small);
    font-weight: 600;
    color: rgba(60,60,60,0.8);
}

.form-hint-small {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(60,60,60,0.5);
    margin-top: 4px;
}

.form-hint-small .material-icons-outlined {
    font-size: 14px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -8px 0 4px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-small);
    color: rgba(60,60,60,0.8);
    cursor: pointer;
    user-select: none;
}

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

.checkbox-label a {
    color: var(--main-blue);
    font-weight: 500;
}

.forgot-password {
    font-size: var(--font-small);
    color: var(--main-blue);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot-password:hover {
    color: rgb(2, 98, 245);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
}

.btn-primary {
    background: var(--main-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Figtree', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: rgb(2, 98, 245);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 120, 253, 0.25);
}

.btn-primary .material-icons-outlined {
    font-size: 20px;
    color: white;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
}

.auth-footer p {
    font-size: var(--font-small);
    color: rgba(60,60,60,0.7);
    margin: 0;
}

.auth-footer a {
    color: var(--main-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-footer a:hover {
    color: rgb(2, 98, 245);
}

/* Auth Back Link */
.auth-back-link {
    margin-top: 16px;
    text-align: center;
}

.auth-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-small);
    color: rgba(60,60,60,0.7);
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 500;
}

.auth-back-link a:hover {
    color: var(--main-color);
}

.auth-back-link .material-icons-outlined {
    font-size: 18px;
}

/* Auth Success Box */
.auth-success-box {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    margin-bottom: 16px;
}

.success-icon .material-icons-outlined {
    font-size: 64px;
    color: rgb(34, 197, 94);
}

.auth-success-box h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 12px;
}

.auth-success-box p {
    font-size: var(--font-small);
    color: rgba(60,60,60,0.7);
    margin-bottom: 8px;
    line-height: 1.6;
}

.auth-success-box p:last-of-type {
    margin-bottom: 0;
}

.success-hint {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(34, 197, 94, 0.15);
}

.success-hint a {
    color: var(--main-blue);
    font-weight: 600;
}

/* Verify Email Styles */
.verify-status-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-state {
    text-align: center;
    width: 100%;
}

.verify-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-icon.pending {
    background: rgba(31, 120, 253, 0.1);
}

.verify-icon.success {
    background: rgba(34, 197, 94, 0.1);
    animation: scaleIn 0.5s ease;
}

.verify-icon.error {
    background: rgba(239, 68, 68, 0.1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.verify-icon .material-icons-outlined {
    font-size: 48px;
}

.verify-icon.pending .material-icons-outlined {
    color: var(--main-blue);
}

.verify-icon.success .material-icons-outlined {
    color: rgb(34, 197, 94);
}

.verify-icon.error .material-icons-outlined {
    color: rgb(239, 68, 68);
}

.verify-state h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 12px;
}

.verify-state p {
    font-size: var(--font-small);
    color: rgba(60,60,60,0.7);
    margin-bottom: 8px;
    line-height: 1.6;
}

.verify-email-display {
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0 24px 0;
}

.verify-email-display strong {
    font-size: 15px;
    color: var(--main-color);
    word-break: break-word;
}

.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.verify-resend {
    text-align: left;
    margin-top: 16px;
    padding-top: 16px;
}

.verify-resend p {
    font-size: 13px;
    color: rgba(60,60,60,0.6);
    margin-bottom: 8px;
}

/* Code Input Styling */
.code-input {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 6px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    padding: 12px 16px;
}

.code-input::placeholder {
    letter-spacing: 6px;
    color: rgba(60,60,60,0.25);
}

.code-input:focus {
    border-color: var(--main-blue);
    box-shadow: 0 0 0 3px rgba(31, 120, 253, 0.1);
}

/* Rotating icon animation */
.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate-icon {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--main-blue);
    font-size: var(--font-small);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease;
    font-family: 'Figtree', sans-serif;
    padding: 0;
}

.btn-link:hover {
    color: rgb(2, 98, 245);
}

.btn-link .material-icons-outlined {
    font-size: 18px;
}

.btn-link-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(60,60,60,0.7);
    font-size: var(--font-small);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
    margin-top: 8px;
}

.btn-link-center:hover {
    color: var(--main-color);
}

/* Spinner loader for auth buttons */
.spinner-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
}

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

/* Auth Mobile Responsiveness */
@media screen and (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 40px 24px;
    }
}

@media screen and (max-width: 480px) {
    .auth-right {
        padding: 32px 20px;
    }

    .auth-form-container {
        max-width: 100%;
    }
}

/* Onboarding Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .onboarding-container {
        padding: 20px 16px;
    }

    .onboarding-progress {
        padding: 16px;
    }

    .progress-bar {
        max-width: none;
    }

    .onboarding-step {
        margin-top: 60px;
    }

    .step-content {
        padding: 32px 24px;
        border-radius: 12px;
    }

    .step-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .step-title {
        font-size: 24px;
    }

    .step-subtitle {
        font-size: var(--font-small);
        margin-bottom: 32px;
    }

    .step-actions {
        flex-direction: column-reverse;
    }

    .btn-back,
    .btn-continue,
    .btn-finish {
        width: 100%;
        max-width: none;
        justify-content: center;
    }

    .skip-onboarding {
        top: 30px;
        right: 16px;
        font-size: 13px;
    }
    
    .onboarding-progress {
        min-height: 60px;
        padding: 16px;
    }
}