
:root {
    color-scheme: light;

    --bg: #f7f7fb;
    --surface: #ffffff;
    --text: #20202b;
    --muted: #858595;
    --border: #e9e8f0;
    --accent: #6c5ce7;
    --accent-hover: #5948d8;
    --danger: #d94343;
    --shadow: 0 12px 40px rgba(35, 25, 80, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    font-weight: 550;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

button,
input {
    font: inherit;
}

/* Logo */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    margin: 0;
    color: var(--text);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.logo span {
    color: var(--accent);
}

/* Authentication */

.auth-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 20px;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(108, 92, 231, 0.08),
            transparent 55%
        ),
        var(--bg);
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 410px;
    padding: 38px;
    background: var(--surface);
    border: 1px solid rgba(225, 223, 239, 0.9);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.auth-card .logo {
    margin-bottom: 38px;
}

.auth-card h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -1.1px;
    line-height: 1.25;
}

.subtitle {
    margin: 10px 0 28px;
    color: var(--muted);
    font-size: 14px;
}

/* Form */

form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

form input {
    width: 100%;
    height: 49px;
    padding: 0 15px;
    color: var(--text);
    background: #fcfcfe;
    border: 1px solid #e6e5ee;
    border-radius: 9px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

form input::placeholder {
    color: #a2a1b0;
}

form input:hover {
    border-color: #cecae8;
}

form input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

form button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 49px;
    margin-top: 5px;
    padding: 12px 18px;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 9px;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.18);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

form button:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.25);
    transform: translateY(-1px);
}

form button:active {
    transform: translateY(0);
}

/* Errors */

.error {
    margin: 20px 0;
    padding: 12px 14px;
    color: var(--danger);
    background: #fff3f3;
    border: 1px solid #f5dada;
    border-radius: 9px;
    font-size: 13px;
}

/* Footer */

.auth-footer {
    margin: 26px 0 0;
    padding-top: 22px;
    color: var(--muted);
    border-top: 1px solid #f0eff5;
    text-align: center;
    font-size: 13px;
}

.auth-footer a {
    margin-left: 3px;
}

/* Main application */

.app {
    min-height: 100vh;
    background: var(--bg);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 6%;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
}

.navbar .logo {
    font-size: 22px;
}

.app-content {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 58px 32px;
}

.app-content h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 750;
    letter-spacing: -1.2px;
    line-height: 1.3;
}

.app-content p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
}

/* Responsive */

@media (max-width: 520px) {
    .auth-container {
        padding: 20px 16px;
    }

    .auth-card {
        padding: 28px 23px;
        border-radius: 15px;
    }

    .auth-card .logo {
        margin-bottom: 30px;
    }

    .auth-card h1 {
        font-size: 25px;
    }

    .navbar {
        height: 64px;
        padding: 0 20px;
    }

    .app-content {
        padding: 36px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

















/* ===== Calendar ===== */

.calendar-page {
    --calendar-accent: #705cf0;
    --calendar-bg: #f8f9fc;
    --calendar-border: #ececf3;
    --calendar-muted: #8e90a1;
    background: var(--calendar-bg);
    color: #252536;
}

.calendar-navbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: #fff;
    border-bottom: 1px solid var(--calendar-border);
}

.calendar-logo {
    color: #252536;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -1px;
}

.calendar-logo span {
    color: var(--calendar-accent);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #eeeaff;
    color: var(--calendar-accent);
    font-weight: 750;
}

.user-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-main {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 42px 36px 60px;
}

.calendar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--calendar-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.calendar-heading h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.25;
    letter-spacing: -1.2px;
    font-weight: 750;
}

.calendar-subtitle {
    margin: 9px 0 0;
    color: var(--calendar-muted);
    font-size: 14px;
}

.add-event-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 17px;
    color: #fff;
    background: var(--calendar-accent);
    border: 1px solid var(--calendar-accent);
    border-radius: 10px;
    box-shadow: 0 4px 12px #705cf025;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.add-event-button:hover {
    background: #5d49df;
    box-shadow: 0 6px 18px #705cf035;
    transform: translateY(-1px);
}

.plus-icon {
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}

/* Calendar panel */

.calendar-panel {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--calendar-border);
    border-radius: 15px;
    box-shadow: 0 6px 30px #25253605;
}

.calendar-toolbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--calendar-border);
}

.week-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-arrow,
.today-button {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--calendar-border);
    border-radius: 8px;
    color: #55556a;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.nav-arrow {
    width: 34px;
    font-size: 18px;
}

.today-button {
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
}

.nav-arrow:hover,
.today-button:hover {
    background: #f5f3ff;
    border-color: #dcd5ff;
    color: var(--calendar-accent);
}

.week-label {
    margin: 0;
    color: #29293a;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.week-badge {
    padding: 6px 10px;
    color: #7160d6;
    background: #f2efff;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

/* Week grid */

.calendar-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-color: #d8d7e5 transparent;
    scrollbar-width: thin;
}

.calendar-grid {
    min-width: 780px;
}

.calendar-header {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    border-bottom: 1px solid var(--calendar-border);
}

.time-header {
    border-right: 1px solid var(--calendar-border);
}

.day-headers,
.day-columns {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.day-header {
    min-width: 0;
    height: 66px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-right: 1px solid #f0eff5;
}

.day-header:last-child,
.day-column:last-child {
    border-right: 0;
}

.day-name {
    color: var(--calendar-muted);
    font-size: 11px;
    font-weight: 600;
}

.day-number {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    color: #333347;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
}

.day-header.is-today .day-name {
    color: var(--calendar-accent);
}

.today-number {
    color: #fff;
    background: var(--calendar-accent);
}

.calendar-body {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
}

.time-labels {
    background: #fff;
    border-right: 1px solid var(--calendar-border);
}

.time-label {
    position: relative;
    padding: 0 9px 0 0;
    color: #9999a9;
    font-size: 10px;
    text-align: right;
    line-height: 1;
    transform: translateY(-5px);
}

.day-column {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-right: 1px solid #f0eff5;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(64px - 1px),
        #f0eff5 calc(64px - 1px),
        #f0eff5 64px
    );
}

.day-column.is-today {
    background-color: #fbfaff;
}

/* Event blocks */

.event-block {
    position: absolute;
    left: 3px;
    right: 3px;
    z-index: 1;
    overflow: hidden;
    padding: 8px 8px 6px 10px;
    background: #eeeaff;
    border: 1px solid #ded7ff;
    border-left: 3px solid var(--calendar-accent);
    border-radius: 6px;
    color: #403578;
    transition: filter .15s, box-shadow .15s;
}

.event-block:hover {
    z-index: 2;
    filter: saturate(1.12);
    box-shadow: 0 3px 10px #4c3bb515;
}

.event-title {
    overflow: hidden;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.event-time {
    margin-top: 4px;
    color: #70649e;
    font-size: 10px;
    line-height: 1.3;
}

/* Panel footer */

.calendar-footer {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    color: var(--calendar-muted);
    border-top: 1px solid var(--calendar-border);
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b4afc9;
}

.add-event-button {
    color: #fff;
    text-decoration: none;
}

/* Responsive */

@media (max-width: 700px) {
    .calendar-navbar {
        height: 60px;
        padding: 0 18px;
    }

    .calendar-logo {
        font-size: 20px;
    }

    .calendar-main {
        padding: 28px 14px 40px;
    }

    .calendar-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        margin-bottom: 22px;
    }

    .calendar-heading h1 {
        font-size: 28px;
    }

    .add-event-button {
        width: 100%;
    }

    .calendar-panel {
        border-radius: 12px;
    }

    .calendar-toolbar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px;
    }

    .week-label {
        order: 3;
        width: 100%;
        text-align: left;
    }

    .week-badge {
        margin-left: auto;
    }

    .user-name {
        max-width: 110px;
    }
}

@media (max-width: 380px) {
    .calendar-main {
        padding-right: 10px;
        padding-left: 10px;
    }

    .week-badge {
        display: none;
    }
}














/* ===== Add event form ===== */

.event-form-main {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 38px 24px 60px;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #77778c;
    font-size: 13px;
    font-weight: 550;
}

.back-link:hover {
    color: var(--calendar-accent);
}

.event-form-card {
    padding: 32px;
    background: #fff;
    border: 1px solid var(--calendar-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px #25253607;
}

.event-form-heading {
    margin-bottom: 28px;
}

.event-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    color: var(--calendar-accent);
    background: #f0edff;
    border-radius: 12px;
    font-size: 26px;
}

.event-form-heading .eyebrow {
    margin-bottom: 7px;
}

.event-form-heading h1 {
    margin: 0;
    color: #252536;
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.8px;
}

.event-form-heading .calendar-subtitle {
    margin-top: 8px;
}

.event-form-card form {
    gap: 21px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.form-field label {
    color: #37374b;
    font-size: 12px;
    font-weight: 700;
}

.form-field label span {
    color: #9999aa;
    font-weight: 400;
}

.form-field input,
.form-field textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    color: #29293a;
    background: #fcfcfe;
    border: 1px solid #e7e6ef;
    border-radius: 9px;
    outline: none;
    font: inherit;
    font-size: 13px;
    transition: border-color .2s, box-shadow .2s;
}

.form-field input {
    height: 46px;
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    background: #fff;
    border-color: var(--calendar-accent);
    box-shadow: 0 0 0 3px #705cf018;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #aaaaba;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.event-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 7px;
    padding-top: 22px;
    border-top: 1px solid #f0eff5;
}

.cancel-button,
.save-event-button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
}

.cancel-button {
    color: #69697d;
    background: #fff;
    border: 1px solid #e7e6ef;
}

.cancel-button:hover {
    color: #333347;
    background: #f8f8fb;
}

.save-event-button {
    color: #fff;
    background: var(--calendar-accent);
    border: 1px solid var(--calendar-accent);
    transition: background .2s;
}

.save-event-button:hover {
    background: #5d49df;
}

.save-event-button span {
    font-size: 17px;
}

@media (max-width: 520px) {
    .event-form-main {
        padding: 24px 14px 40px;
    }

    .event-form-card {
        padding: 23px 18px;
        border-radius: 13px;
    }

    .event-form-heading h1 {
        font-size: 25px;
    }

    .form-row {
        gap: 10px;
    }

    .event-form-actions > * {
        flex: 1;
    }
}


