* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #172033;
    background:
        radial-gradient(circle at top left, rgba(79, 109, 245, 0.12), transparent 32rem),
        #f6f8fb;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e5e9f0;
    backdrop-filter: blur(16px);
}

.navbar {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
}

.logo-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #4f6df5;
    border-radius: 10px;
}

.nav-links,
.nav-actions,
.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 700;
}

.nav-links a,
.footer-links a {
    color: #4b5568;
}

.nav-links a:hover,
.footer-links a:hover {
    color: #172033;
}

.nav-button,
.logout-form button,
.language-switcher a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 12px;
    font-weight: 800;
    border: 1px solid #dfe5f2;
    background: #ffffff;
    color: #172033;
    cursor: pointer;
}

.nav-button-primary,
.logout-form button:hover,
.nav-button:hover {
    color: #ffffff;
    border-color: #4f6df5;
    background: #4f6df5;
}

.logout-form {
    margin: 0;
}

.logout-form button {
    font-family: inherit;
    font-size: 14px;
}

.language-switcher {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: #eef2ff;
}

.language-switcher a {
    min-height: 30px;
    padding: 6px 9px;
    border: 0;
    background: transparent;
}

.language-switcher a.active {
    color: #ffffff;
    background: #4f6df5;
}

.messages-wrapper {
    max-width: 1180px;
    margin: 24px auto 0;
    padding: 0 24px;
}

.message {
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 700;
    background: #eef2ff;
    border: 1px solid #dfe5f2;
}

.message-success {
    color: #11633a;
    background: #e9f9f0;
    border-color: #bce8cd;
}

.message-error {
    color: #8f1d1d;
    background: #fff0f0;
    border-color: #ffd0d0;
}

.main-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 24px;
}

.hero,
.page-section {
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 60px rgba(23, 32, 51, 0.08);
    border: 1px solid #e5e9f0;
}

.hero {
    padding: 56px;
}

.hero-split {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 38px;
    align-items: center;
}

.hero-content {
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    font-weight: 800;
    color: #4f6df5;
}

h1 {
    margin: 0 0 20px;
    font-size: 50px;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

h2 {
    margin-top: 0;
    line-height: 1.2;
}

h3 {
    margin-bottom: 8px;
}

.hero-text,
.page-description,
.card p,
.feature-item p,
.docs-card p,
.dashboard-card p,
.step-card p,
.product-strip p,
.plan-description {
    line-height: 1.7;
    color: #596579;
}

.hero-text,
.page-description {
    max-width: 780px;
    font-size: 18px;
}

.hero-actions,
.docs-links,
.notice-actions,
.quick-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 13px 20px;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.button-primary {
    color: #ffffff;
    background: #4f6df5;
}

.button-secondary {
    color: #172033;
    background: #eef2ff;
}

.button:hover {
    transform: translateY(-1px);
}

.hero-panel {
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(145deg, #eef2ff, #ffffff);
}

.mini-dashboard {
    padding: 22px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(23, 32, 51, 0.12);
}

.mini-dashboard-header,
.habit-row,
.stats-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mini-dashboard-header {
    margin-bottom: 18px;
    color: #596579;
    font-weight: 800;
}

.mini-dashboard-header strong {
    color: #4f6df5;
    font-size: 24px;
}

.habit-row {
    margin-bottom: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #f6f8fb;
    font-weight: 700;
}

.habit-row span {
    margin-right: 8px;
    color: #4f6df5;
}

.habit-row.completed {
    background: #e9f9f0;
}

.stats-strip {
    margin-top: 18px;
    gap: 12px;
}

.stats-strip div {
    flex: 1;
    padding: 14px;
    border-radius: 16px;
    background: #eef2ff;
}

.stats-strip strong,
.stats-strip span {
    display: block;
}

.stats-strip span {
    margin-top: 4px;
    color: #596579;
    font-size: 13px;
}

.section-heading {
    margin-top: 46px;
    max-width: 780px;
}

.section-heading h2 {
    font-size: 34px;
    letter-spacing: -0.03em;
}

.cards,
.feature-grid,
.pricing-grid,
.dashboard-grid,
.docs-grid,
.steps-grid {
    margin-top: 32px;
    display: grid;
    gap: 20px;
}

.cards,
.feature-grid,
.pricing-grid {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid,
.docs-grid,
.steps-grid {
    grid-template-columns: repeat(2, 1fr);
}

.card,
.feature-item,
.pricing-card,
.endpoint-list,
.dashboard-card,
.docs-card,
.step-card,
.notice-card,
.empty-state {
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
}

.card,
.feature-item,
.pricing-card,
.dashboard-card,
.docs-card,
.step-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover,
.feature-item:hover,
.pricing-card:hover,
.dashboard-card:hover,
.docs-card:hover,
.step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(23, 32, 51, 0.09);
}

.card-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f6df5;
    background: #eef2ff;
    border-radius: 14px;
    font-weight: 900;
}

.page-section {
    margin-bottom: 28px;
    padding: 42px;
}

.product-strip {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.price {
    margin: 12px 0;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.featured {
    border-color: #4f6df5;
    box-shadow: 0 16px 40px rgba(79, 109, 245, 0.14);
}

.plan-badge,
.current-plan-label,
.status-badge,
.dashboard-label,
.step-number {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    background: #eef2ff;
    color: #4f6df5;
}

.plan-badge-primary,
.current-plan-label,
.status-succeeded {
    color: #11633a;
    background: #e9f9f0;
}

.status-pending {
    color: #8a5c00;
    background: #fff7dc;
}

.status-failed {
    color: #8f1d1d;
    background: #fff0f0;
}

.status-canceled {
    color: #4b5568;
    background: #eef0f4;
}

.pricing-card ul {
    margin: 22px 0;
    padding-left: 20px;
    color: #4b5568;
    line-height: 1.9;
}

.notice-card {
    margin-top: 26px;
    background: #f8faff;
}

.notice-actions {
    margin-top: 16px;
}

.dashboard-card h2 {
    margin-top: 14px;
    word-break: break-word;
}

.docs-card a,
.notice-card a {
    color: #4f6df5;
    font-weight: 800;
}

.command-list {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.command-list div {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 14px;
    background: #f6f8fb;
}

.command-list code,
.endpoint-list code {
    padding: 5px 8px;
    border-radius: 8px;
    color: #172033;
    background: #eef2ff;
    font-weight: 800;
}

.endpoint-list {
    margin-top: 32px;
}

.endpoint-list li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.table-wrapper {
    margin-top: 28px;
    overflow-x: auto;
    border: 1px solid #e5e9f0;
    border-radius: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e9f0;
}

th {
    color: #596579;
    background: #f6f8fb;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

tr:last-child td {
    border-bottom: 0;
}

.empty-state {
    margin-top: 28px;
    text-align: center;
}

.empty-state .button {
    margin-top: 12px;
}

.site-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: #6b7485;
}

.site-footer p {
    max-width: 560px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .navbar,
    .nav-links,
    .nav-actions,
    .site-footer,
    .product-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-split,
    .cards,
    .feature-grid,
    .pricing-grid,
    .dashboard-grid,
    .docs-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 38px;
    }

    .hero,
    .page-section {
        padding: 28px;
    }
}

@media (max-width: 560px) {
    .main-content {
        padding: 32px 16px;
    }

    .navbar,
    .site-footer,
    .messages-wrapper {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero,
    .page-section {
        border-radius: 22px;
    }

    .nav-links,
    .nav-actions,
    .quick-actions,
    .hero-actions,
    .docs-links,
    .notice-actions {
        width: 100%;
    }

    .nav-button,
    .logout-form,
    .logout-form button,
    .button {
        width: 100%;
    }

    .language-switcher {
        width: 100%;
        justify-content: center;
    }
}

.calendar-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.calendar-summary p {
    margin-bottom: 0;
    color: #596579;
}

.calendar-wrapper {
    margin-top: 28px;
    padding: 18px;
    border-radius: 22px;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-weekdays {
    margin-bottom: 10px;
}

.calendar-weekdays span {
    padding: 10px;
    text-align: center;
    color: #596579;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 108px;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
}

.calendar-blank {
    background: transparent;
    border-color: transparent;
}

.calendar-day-number {
    display: block;
    margin-bottom: 14px;
    font-weight: 900;
}

.calendar-count,
.calendar-empty {
    display: inline-flex;
    padding: 7px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.calendar-count {
    color: #11633a;
    background: #e9f9f0;
}

.calendar-empty {
    color: #6b7485;
    background: #eef0f4;
}

.calendar-today {
    border-color: #4f6df5;
    box-shadow: 0 10px 28px rgba(79, 109, 245, 0.12);
}

.calendar-completed {
    background: #fbfffd;
}

@media (max-width: 720px) {
    .calendar-wrapper {
        overflow-x: auto;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 720px;
    }

    .calendar-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 0.82fr;
    gap: 30px;
    align-items: start;
}

.auth-intro,
.auth-card {
    padding: 42px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e5e9f0;
    box-shadow: 0 20px 60px rgba(23, 32, 51, 0.08);
}

.auth-benefits {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}

.auth-benefits div {
    padding: 14px 16px;
    border-radius: 16px;
    color: #172033;
    background: #eef2ff;
    font-weight: 800;
}

.auth-card h2 {
    margin-bottom: 22px;
}

.form-card {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-weight: 900;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #dfe5f2;
    border-radius: 14px;
    color: #172033;
    background: #ffffff;
    font: inherit;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4f6df5;
    box-shadow: 0 0 0 4px rgba(79, 109, 245, 0.12);
}

.form-group small {
    color: #6b7485;
    line-height: 1.5;
}

.form-group ul,
.form-errors ul,
.errorlist {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #8f1d1d;
    line-height: 1.5;
}

.form-errors {
    padding: 14px 16px;
    border-radius: 14px;
    color: #8f1d1d;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
}

.form-submit {
    width: 100%;
    margin-top: 6px;
}

.auth-switch {
    margin-top: 22px;
    color: #596579;
}

.auth-switch a {
    color: #4f6df5;
    font-weight: 900;
}

@media (max-width: 980px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-intro,
    .auth-card {
        padding: 28px;
    }
}

/* Habit management pages */

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.info-card {
    background: #ffffff;
    border: 1px solid #e6eaf2;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: 0 16px 40px rgba(32, 44, 77, 0.06);
}

.habit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.habit-card {
    background: #ffffff;
    border: 1px solid #e6eaf2;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 50px rgba(32, 44, 77, 0.08);
}

.habit-card-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.habit-card h2 {
    margin: 4px 0 0;
    font-size: 24px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 8px 12px;
    background: #eef2ff;
    color: #4657c8;
    font-size: 13px;
    font-weight: 800;
}

.status-success {
    background: #e8fbef;
    color: #197d45;
}

.habit-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.habit-details div {
    background: #f7f9fd;
    border-radius: 16px;
    padding: 14px;
}

.habit-details dt {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
}

.habit-details dd {
    margin: 0;
    color: #172033;
    font-weight: 800;
}

.habit-reward,
.habit-note {
    color: #4c5870;
    line-height: 1.6;
}

.habit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.habit-actions form {
    margin: 0;
}

.empty-state {
    background: #ffffff;
    border: 1px dashed #cfd7e6;
    border-radius: 24px;
    padding: 36px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(32, 44, 77, 0.05);
}

.form-check {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 14px 0;
}

.form-check input {
    width: auto;
}

.form-check label {
    margin: 0;
    font-weight: 800;
}

@media (max-width: 900px) {
    .page-header {
        flex-direction: column;
    }

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

    .habit-card-header {
        flex-direction: column;
    }

    .habit-details {
        grid-template-columns: 1fr;
    }
}

/* Calendar planner */

.calendar-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.calendar-planner-wrapper {
    overflow-x: visible;
}

.calendar-planner-grid {
    align-items: start;
}

.calendar-planner-day {
    min-height: 190px;
    cursor: pointer;
    transition: 0.2s ease;
}

.calendar-planner-day[open] {
    grid-column: span 2;
    min-height: 360px;
    background: #ffffff;
    border-color: #4f6df5;
    box-shadow: 0 22px 70px rgba(32, 44, 77, 0.14);
    z-index: 2;
}

.calendar-planner-day summary {
    list-style: none;
}

.calendar-planner-day summary::-webkit-details-marker {
    display: none;
}

.calendar-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.calendar-habit-total {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #eef2ff;
    color: #4657c8;
    font-size: 12px;
    font-weight: 900;
}

.calendar-preview-list {
    display: grid;
    gap: 8px;
}

.calendar-preview-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 22px;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    background: #f7f9fd;
    font-size: 13px;
}

.calendar-preview-time {
    color: #596579;
    font-weight: 900;
}

.calendar-preview-action {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #172033;
    font-weight: 800;
}

.calendar-status {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
}

.calendar-status-done {
    background: #e8fbef;
    color: #197d45;
}

.calendar-status-pending {
    background: #f3f5f9;
    color: #8a95a8;
}

.calendar-day-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e6eaf2;
}

.calendar-day-panel h3 {
    margin: 0 0 14px;
}

.calendar-full-list {
    display: grid;
    gap: 12px;
}

.calendar-full-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: #f7f9fd;
}

.calendar-full-item strong {
    display: block;
    color: #172033;
    margin-bottom: 4px;
}

.calendar-full-item span {
    color: #4c5870;
}

.calendar-full-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.calendar-full-actions form {
    margin: 0;
}

.calendar-hour-actions {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e6eaf2;
}

.calendar-hour-actions p {
    margin: 0 0 12px;
    color: #4c5870;
    font-weight: 800;
}

.calendar-hour-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calendar-hour-grid a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4657c8;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.calendar-hour-grid a:hover {
    background: #dfe6ff;
}

@media (max-width: 900px) {
    .calendar-planner-day[open] {
        grid-column: span 1;
    }

    .calendar-full-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-full-actions {
        justify-content: flex-start;
    }
}

/* Apple-like calendar layout */

.calendar-page {
    max-width: 1040px;
    margin: 0 auto;
}

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}

.calendar-toolbar h1 {
    margin: 4px 0 0;
    font-size: 42px;
}

.calendar-toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.calendar-month-card {
    background: #ffffff;
    border: 1px solid #e6eaf2;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(32, 44, 77, 0.08);
    margin-bottom: 28px;
}

.calendar-weekdays-minimal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: #8a95a8;
    font-weight: 900;
    margin-bottom: 14px;
}

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

.calendar-month-day {
    min-height: 86px;
    border-radius: 20px;
    text-decoration: none;
    color: #172033;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.calendar-month-day:hover {
    background: #f7f9fd;
}

.calendar-month-number {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
}

.calendar-month-today .calendar-month-number {
    background: #ff3b4f;
    color: #ffffff;
}

.calendar-month-selected {
    border-color: #4f6df5;
    background: #f5f7ff;
}

.calendar-month-selected .calendar-month-number {
    background: #4f6df5;
    color: #ffffff;
}

.calendar-month-blank {
    background: transparent;
    border: 0;
}

.calendar-dots {
    display: flex;
    gap: 5px;
    min-height: 8px;
}

.calendar-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.calendar-dot-done {
    background: #21b66f;
}

.calendar-dot-pending {
    background: #c4ccd9;
}

.selected-day-card {
    background: #ffffff;
    border: 1px solid #e6eaf2;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(32, 44, 77, 0.08);
}

.selected-day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e6eaf2;
    margin-bottom: 24px;
}

.selected-day-header h2 {
    margin: 4px 0 0;
    font-size: 30px;
}

.selected-day-counter {
    border-radius: 999px;
    padding: 10px 14px;
    background: #eef2ff;
    color: #4657c8;
    font-weight: 900;
}

.day-timeline {
    display: grid;
    gap: 18px;
}

.day-timeline-item {
    display: grid;
    grid-template-columns: 72px 2px 1fr;
    gap: 18px;
    align-items: stretch;
}

.day-time {
    color: #8a95a8;
    font-size: 18px;
    font-weight: 900;
    padding-top: 18px;
}

.day-line {
    background: #e6eaf2;
    border-radius: 999px;
}

.day-habit-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    background: #f7f9fd;
    border-radius: 22px;
    padding: 18px;
}

.day-habit-card h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.day-status {
    margin: 0;
    font-weight: 900;
}

.day-status-done {
    color: #197d45;
}

.day-status-pending {
    color: #8a95a8;
}

.day-habit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.day-habit-actions form {
    margin: 0;
}

.quick-add-card {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #e6eaf2;
}

.quick-add-card p {
    margin: 0 0 12px;
    color: #4c5870;
    font-weight: 900;
}

@media (max-width: 760px) {
    .calendar-toolbar,
    .selected-day-header {
        flex-direction: column;
    }

    .calendar-toolbar h1 {
        font-size: 34px;
    }

    .calendar-month-card,
    .selected-day-card {
        padding: 18px;
        border-radius: 22px;
    }

    .calendar-month-grid {
        gap: 6px;
    }

    .calendar-month-day {
        min-height: 64px;
        border-radius: 16px;
    }

    .calendar-month-number {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .day-timeline-item {
        grid-template-columns: 58px 2px 1fr;
        gap: 12px;
    }

    .day-habit-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .day-habit-actions {
        justify-content: flex-start;
    }
}

.telegram-qr-card {
    margin: 24px 0;
    text-align: center;
}

.telegram-qr {
    width: 220px;
    height: 220px;
    max-width: 100%;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.content-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clean-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.clean-list li:last-child {
    border-bottom: 0;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.data-table th {
    background: #f8fafc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 800px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.wide-layout {
    grid-template-columns: minmax(260px, 0.7fr) minmax(620px, 1.7fr);
    align-items: flex-start;
}

.staff-mailing-card {
    max-width: none;
}

.mailing-users-table {
    margin-top: 1rem;
    max-height: 520px;
    overflow: auto;
}

.data-table th a {
    color: inherit;
    text-decoration: none;
}

.data-table th a:hover {
    text-decoration: underline;
}

.data-table input[type="checkbox"] {
    width: auto;
}

@media (max-width: 1000px) {
    .wide-layout {
        grid-template-columns: 1fr;
    }
}

/* Commit 17 — full SaaS polish: premium landing blocks */

.hero-premium {
    position: relative;
    overflow: hidden;
}

.hero-premium::before {
    content: "";
    position: absolute;
    inset: -30% auto auto 45%;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(79, 109, 245, 0.18), transparent 68%);
    pointer-events: none;
}

.hero-premium > * {
    position: relative;
}

.hero-text-secondary {
    margin-top: -8px;
}

.hero-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-trust-row span {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    color: #3f4b62;
    background: #f4f6ff;
    border: 1px solid #dfe5f2;
    font-size: 13px;
    font-weight: 800;
}

.product-preview {
    position: relative;
    padding: 20px;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.92));
    border: 1px solid #dfe5f2;
    box-shadow: 0 28px 70px rgba(23, 32, 51, 0.16);
}

.preview-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    color: #4b5568;
}

.preview-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 999px;
    background: #d2d9ea;
}

.preview-score {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #172033;
    color: #ffffff;
}

.preview-score span {
    display: block;
    margin-bottom: 8px;
    color: #b9c3d7;
    font-size: 13px;
    font-weight: 800;
}

.preview-score strong {
    font-size: 34px;
    letter-spacing: -0.04em;
}

.progress-ring {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 8px solid #6f86ff;
    font-size: 20px;
    font-weight: 900;
}

.product-preview .habit-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 13px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
}

.product-preview .habit-row > span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #4f6df5;
    background: #eef2ff;
    font-weight: 900;
}

.product-preview .habit-row.completed > span {
    color: #ffffff;
    background: #23b26d;
}

.product-preview .habit-row strong {
    display: block;
    margin-bottom: 3px;
}

.product-preview .habit-row small {
    color: #69758a;
    font-weight: 700;
}

.preview-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    background: #f6f8fb;
}

.preview-calendar span {
    height: 22px;
    border-radius: 8px;
    background: #dfe5f2;
}

.preview-calendar span.done {
    background: #4f6df5;
}

.telegram-pill {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 999px;
    color: #11633a;
    background: #e9f9f0;
    border: 1px solid #bce8cd;
    font-weight: 900;
}

.atomic-section {
    margin-top: 28px;
    padding: 30px;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 30px;
    align-items: center;
    border-radius: 28px;
    background: #172033;
    color: #ffffff;
    box-shadow: 0 20px 60px rgba(23, 32, 51, 0.12);
}

.atomic-section h2 {
    margin-bottom: 0;
    font-size: 32px;
    letter-spacing: -0.03em;
}

.atomic-section p:not(.eyebrow) {
    margin: 0;
    color: #d5dcea;
    line-height: 1.75;
}

.atomic-section .eyebrow {
    color: #9fb0ff;
}

.premium-card {
    position: relative;
    overflow: hidden;
}

.premium-card::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(79, 109, 245, 0.08);
}

.final-cta {
    margin-top: 28px;
}

@media (max-width: 860px) {
    .atomic-section {
        grid-template-columns: 1fr;
    }

    .preview-score {
        grid-template-columns: 1fr;
    }

    .progress-ring {
        width: 66px;
        height: 66px;
    }
}

/* Commit 17 — full SaaS polish: auth, dashboard, habits and calendar */

.auth-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.72fr);
    gap: 34px;
    align-items: start;
}

.auth-intro,
.auth-card {
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e5e9f0;
    box-shadow: 0 20px 60px rgba(23, 32, 51, 0.08);
}

.auth-intro {
    padding: 42px;
    position: sticky;
    top: 104px;
}

.auth-card {
    padding: 34px;
}

.auth-intro h1,
.auth-card h2 {
    letter-spacing: -0.035em;
}

.auth-benefits {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.auth-benefits > div {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
    color: #3f4b62;
    font-weight: 800;
}

.auth-benefits strong {
    display: block;
    margin-bottom: 4px;
    color: #172033;
}

.auth-benefits span {
    display: block;
    color: #69758a;
    line-height: 1.55;
    font-weight: 600;
}

.form-card,
.styled-form {
    display: grid;
    gap: 18px;
}

.form-group,
.form-field {
    display: grid;
    gap: 8px;
}

.form-group label,
.form-field label,
.form-check label {
    color: #2c3649;
    font-size: 14px;
    font-weight: 900;
}

.form-group input,
.form-group select,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #dfe5f2;
    background: #ffffff;
    color: #172033;
    font: inherit;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #4f6df5;
    box-shadow: 0 0 0 4px rgba(79, 109, 245, 0.12);
}

.form-group small,
.form-field small {
    color: #69758a;
    line-height: 1.5;
}

.form-check {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: #4f6df5;
}

.form-errors,
.errorlist {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    color: #8f1d1d;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    font-weight: 700;
}

.errorlist {
    list-style: none;
}

.form-submit {
    width: 100%;
    margin-top: 4px;
}

.auth-switch {
    margin: 20px 0 0;
    color: #596579;
    line-height: 1.6;
    text-align: center;
}

.auth-switch a {
    color: #4f6df5;
    font-weight: 900;
}

.auth-helper {
    margin: -6px 0 0;
    text-align: right;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
}

.dashboard-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.9));
    border: 1px solid #e5e9f0;
    box-shadow: 0 18px 46px rgba(23, 32, 51, 0.06);
}

.dashboard-card::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(79, 109, 245, 0.08);
}

.dashboard-card > * {
    position: relative;
}

.dashboard-label {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #4f6df5;
    background: #eef2ff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-card h2 {
    overflow-wrap: anywhere;
    margin-bottom: 10px;
}

.quick-actions {
    padding-top: 4px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.page-header p {
    color: #596579;
    line-height: 1.7;
}

.info-card {
    margin: 24px 0;
    padding: 16px 18px;
    border-radius: 18px;
    color: #3f4b62;
    background: #f4f6ff;
    border: 1px solid #dfe5f2;
}

.habit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.habit-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
    box-shadow: 0 16px 42px rgba(23, 32, 51, 0.06);
}

.habit-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.habit-card h2 {
    margin-bottom: 0;
    letter-spacing: -0.025em;
}

.status-pill {
    display: inline-flex;
    white-space: nowrap;
    padding: 8px 11px;
    border-radius: 999px;
    color: #69758a;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
    font-size: 12px;
    font-weight: 900;
}

.status-success {
    color: #11633a;
    background: #e9f9f0;
    border-color: #bce8cd;
}

.habit-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.habit-details div {
    padding: 13px;
    border-radius: 16px;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
}

.habit-details dt {
    margin-bottom: 4px;
    color: #69758a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.habit-details dd {
    margin: 0;
    color: #172033;
    font-weight: 800;
}

.habit-reward,
.habit-note {
    padding: 13px 14px;
    border-radius: 16px;
    line-height: 1.55;
}

.habit-reward {
    background: #fff8e8;
    border: 1px solid #ffe3a6;
}

.habit-note {
    color: #11633a;
    background: #e9f9f0;
    border: 1px solid #bce8cd;
    font-weight: 800;
}

.habit-actions,
.day-habit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.habit-actions form,
.day-habit-actions form,
.inline-form {
    margin: 0;
}

.empty-state {
    margin-top: 24px;
    padding: 36px;
    border-radius: 26px;
    text-align: center;
    background: #f6f8fb;
    border: 1px dashed #cfd7e8;
}

.empty-state p {
    color: #596579;
    line-height: 1.7;
}

.calendar-page {
    display: grid;
    gap: 24px;
}

.calendar-toolbar,
.selected-day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.calendar-toolbar-actions {
    display: flex;
    gap: 10px;
}

.calendar-month-card,
.selected-day-card,
.quick-add-card {
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
    box-shadow: 0 16px 42px rgba(23, 32, 51, 0.06);
}

.calendar-weekdays,
.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.calendar-weekdays {
    margin-bottom: 10px;
    color: #69758a;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.calendar-month-day {
    min-height: 74px;
    padding: 10px;
    border-radius: 18px;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.calendar-month-day:hover {
    transform: translateY(-2px);
    border-color: #b8c5ff;
    background: #f4f6ff;
}

.calendar-month-blank {
    opacity: 0.45;
}

.calendar-month-number {
    display: block;
    color: #172033;
    font-weight: 900;
}

.calendar-month-today {
    border-color: #4f6df5;
}

.calendar-month-selected {
    background: #eef2ff;
    border-color: #4f6df5;
}

.calendar-dots {
    display: flex;
    gap: 5px;
    margin-top: 18px;
}

.calendar-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.calendar-dot-done {
    background: #23b26d;
}

.calendar-dot-pending {
    background: #f1b84b;
}

.selected-day-counter {
    padding: 10px 13px;
    border-radius: 999px;
    color: #4f6df5;
    background: #eef2ff;
    font-weight: 900;
}

.day-timeline {
    display: grid;
    gap: 16px;
}

.day-timeline-item {
    display: grid;
    grid-template-columns: 70px 18px 1fr;
    gap: 12px;
    align-items: stretch;
}

.day-time {
    padding-top: 16px;
    color: #69758a;
    font-weight: 900;
}

.day-line {
    width: 2px;
    margin: 0 auto;
    border-radius: 99px;
    background: #dfe5f2;
}

.day-habit-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
}

.day-habit-card h3 {
    margin-top: 0;
}

.day-status {
    margin: 0;
    font-weight: 900;
}

.day-status-done {
    color: #11633a;
}

.day-status-pending {
    color: #8a651b;
}

.calendar-hour-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.calendar-hour-grid a {
    padding: 10px;
    border-radius: 14px;
    text-align: center;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
    font-weight: 900;
}

.calendar-hour-grid a:hover {
    color: #ffffff;
    background: #4f6df5;
    border-color: #4f6df5;
}

@media (max-width: 980px) {
    .auth-layout,
    .dashboard-grid,
    .habit-grid {
        grid-template-columns: 1fr;
    }

    .auth-intro {
        position: static;
    }

    .page-header,
    .calendar-toolbar,
    .selected-day-header,
    .day-habit-card {
        flex-direction: column;
    }

    .calendar-hour-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .auth-intro,
    .auth-card,
    .page-section,
    .calendar-month-card,
    .selected-day-card,
    .quick-add-card {
        padding: 22px;
        border-radius: 22px;
    }

    .habit-details,
    .calendar-weekdays,
    .calendar-month-grid {
        grid-template-columns: 1fr;
    }

    .calendar-weekdays {
        display: none;
    }

    .calendar-month-day {
        min-height: 54px;
    }

    .day-timeline-item {
        grid-template-columns: 1fr;
    }

    .day-line {
        display: none;
    }

    .calendar-hour-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Commit 17 — full SaaS polish: docs, staff tables and service pages */

.docs-grid,
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.docs-card,
.content-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
    box-shadow: 0 16px 42px rgba(23, 32, 51, 0.06);
}

.docs-card::after,
.content-card::after {
    content: "";
    position: absolute;
    right: -48px;
    bottom: -48px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(79, 109, 245, 0.07);
}

.docs-card > *,
.content-card > * {
    position: relative;
}

.step-number {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 14px;
    color: #ffffff;
    background: #4f6df5;
    font-weight: 900;
}

.docs-card a {
    display: inline-flex;
    margin-top: 10px;
    color: #4f6df5;
    font-weight: 900;
}

.command-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.command-list div {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
}

.command-list code,
.code-box {
    padding: 8px 10px;
    border-radius: 10px;
    color: #4f6df5;
    background: #eef2ff;
    font-weight: 900;
}

.code-box {
    margin: 16px 0;
    overflow-wrap: anywhere;
    font-size: 18px;
    text-align: center;
}

.telegram-qr-card {
    margin: 22px 0;
    padding: 18px;
    border-radius: 20px;
    text-align: center;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
}

.telegram-qr {
    width: 220px;
    max-width: 100%;
    height: auto;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #dfe5f2;
}

.wide-layout {
    grid-template-columns: minmax(320px, 0.48fr) minmax(0, 1fr);
}

.staff-mailing-card {
    min-width: 0;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 24px;
    border-radius: 22px;
    border: 1px solid #e5e9f0;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(23, 32, 51, 0.06);
}

.data-table,
.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.data-table th,
.data-table td,
.table-wrapper th,
.table-wrapper td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e9f0;
    text-align: left;
    vertical-align: top;
}

.data-table th,
.table-wrapper th {
    color: #69758a;
    background: #f6f8fb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.data-table td,
.table-wrapper td {
    color: #2c3649;
    font-weight: 700;
}

.data-table tr:hover td,
.table-wrapper tr:hover td {
    background: #fafbff;
}

.data-table a,
.table-wrapper a {
    color: #4f6df5;
    font-weight: 900;
}

.mailing-users-table {
    max-height: 520px;
    overflow: auto;
}

.mailing-users-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4f6df5;
}

.status-badge {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f6df5;
    font-size: 12px;
    font-weight: 900;
}

.clean-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.clean-list li {
    padding: 14px;
    border-radius: 16px;
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
}

.clean-list span {
    color: #69758a;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 980px) {
    .docs-grid,
    .content-grid,
    .wide-layout {
        grid-template-columns: 1fr;
    }

    .command-list div {
        grid-template-columns: 1fr;
    }
}


/* Commit 18 — support contacts */

.footer-support {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.footer-support strong {
    color: #172033;
}

.footer-support a {
    color: #4f6df5;
    font-weight: 900;
}

/* Commit 22 — mobile layout for demo site */

@media (max-width: 768px) {
    body {
        font-size: 15px;
        overflow-x: hidden;
    }

    .site-header {
        z-index: 50;
    }

    .navbar {
        min-height: auto;
        padding: 8px 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .logo {
        flex: 0 0 auto;
        gap: 6px;
        font-size: 15px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .logo-mark {
        width: 22px;
        height: 22px;
        border-radius: 8px;
        font-size: 13px;
    }

    .nav-links {
        display: none;
    }

    .nav-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: nowrap;
        width: auto;
        min-width: 0;
    }

    .language-switcher {
        display: none;
    }

    .nav-button,
    .logout-form button {
        width: auto;
        min-height: 32px;
        padding: 7px 9px;
        border-radius: 10px;
        font-size: 12px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .logout-form {
        width: auto;
        margin: 0;
    }

    .nav-actions a[href*="payment"],
    .nav-actions a[href*="staff"] {
        display: none;
    }

    .main-content {
        padding: 24px 14px 32px;
    }

    .hero,
    .page-section {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .hero-split,
    .atomic-section,
    .auth-layout,
    .dashboard-grid,
    .habit-grid,
    .docs-grid,
    .content-grid,
    .pricing-grid,
    .feature-grid,
    .cards,
    .wide-layout {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 28px;
        line-height: 1.12;
        margin-bottom: 12px;
        letter-spacing: -0.03em;
    }

    h2,
    .section-heading h2 {
        font-size: 22px;
        line-height: 1.2;
    }

    h3 {
        font-size: 18px;
        line-height: 1.25;
    }

    .hero-text,
    .page-description,
    .card p,
    .feature-item p,
    .docs-card p,
    .dashboard-card p,
    .step-card p,
    .product-strip p,
    .plan-description {
        font-size: 15px;
        line-height: 1.55;
    }

    .hero-actions,
    .docs-links,
    .notice-actions,
    .quick-actions,
    .habit-actions,
    .day-habit-actions,
    .calendar-toolbar-actions,
    .calendar-summary-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
    }

    .button,
    .hero-actions .button,
    .docs-links .button,
    .notice-actions .button,
    .quick-actions .button,
    .habit-actions .button,
    .day-habit-actions .button,
    .calendar-toolbar-actions .button,
    .calendar-summary-actions .button {
        width: 100%;
        min-height: 42px;
        padding: 11px 14px;
        text-align: center;
    }

    .card,
    .feature-item,
    .pricing-card,
    .endpoint-list,
    .dashboard-card,
    .docs-card,
    .step-card,
    .notice-card,
    .empty-state,
    .content-card,
    .habit-card,
    .auth-intro,
    .auth-card,
    .calendar-month-card,
    .selected-day-card,
    .quick-add-card {
        padding: 16px;
        border-radius: 18px;
    }

    .section-heading,
    .cards,
    .feature-grid,
    .pricing-grid,
    .dashboard-grid,
    .docs-grid,
    .steps-grid,
    .content-grid {
        margin-top: 22px;
        gap: 14px;
    }

    .product-strip,
    .page-header,
    .calendar-toolbar,
    .selected-day-header,
    .calendar-summary,
    .day-habit-card,
    .calendar-full-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-intro {
        position: static;
    }

    .form-card,
    .styled-form {
        gap: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-field input,
    .form-field select,
    .form-field textarea,
    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 16px;
    }

    .habit-details {
        grid-template-columns: 1fr;
    }

    .table-wrapper,
    .responsive-table,
    .payment-history,
    .staff-table,
    .mailing-users-table {
        width: 100%;
        overflow-x: auto;
    }

    table,
    .data-table,
    .table-wrapper table {
        min-width: 680px;
    }

    th,
    td,
    .data-table th,
    .data-table td,
    .table-wrapper th,
    .table-wrapper td {
        padding: 12px;
        font-size: 13px;
    }

    .calendar-wrapper,
    .calendar-planner-wrapper,
    .calendar-month-card {
        overflow-x: auto;
    }

    .calendar-weekdays,
    .calendar-grid,
    .calendar-month-grid {
        min-width: 620px;
    }

    .calendar-toolbar h1 {
        font-size: 28px;
    }

    .day-timeline-item {
        grid-template-columns: 1fr;
    }

    .day-line {
        display: none;
    }

    .calendar-hour-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .messages-wrapper {
        margin-top: 14px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .message {
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 14px;
    }

    .site-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px 14px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 7px 10px;
        gap: 6px;
    }

    .logo {
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 14px;
    }

    .logo-mark {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .nav-actions {
        gap: 5px;
    }

    .nav-button,
    .logout-form button {
        min-height: 30px;
        padding: 6px 7px;
        border-radius: 9px;
        font-size: 11px;
    }

    .main-content {
        padding: 18px 12px 28px;
    }

    .hero,
    .page-section {
        padding: 18px 14px;
        border-radius: 18px;
    }

    h1 {
        font-size: 24px;
        line-height: 1.14;
    }

    h2,
    .section-heading h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 17px;
    }

    .hero-text,
    .page-description,
    .card p,
    .feature-item p,
    .docs-card p,
    .dashboard-card p,
    .step-card p,
    .product-strip p,
    .plan-description {
        font-size: 14px;
    }

    .hero-panel,
    .mini-dashboard,
    .product-preview,
    .preview-score,
    .atomic-section,
    .card,
    .feature-item,
    .pricing-card,
    .endpoint-list,
    .dashboard-card,
    .docs-card,
    .step-card,
    .notice-card,
    .empty-state,
    .content-card,
    .habit-card,
    .auth-intro,
    .auth-card,
    .calendar-month-card,
    .selected-day-card,
    .quick-add-card {
        padding: 14px;
        border-radius: 16px;
    }

    .stats-strip,
    .preview-score,
    .habit-row,
    .calendar-full-item,
    .day-habit-card {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .price {
        font-size: 26px;
    }

    .command-list div {
        grid-template-columns: 1fr;
    }

    .calendar-weekdays,
    .calendar-grid,
    .calendar-month-grid {
        min-width: 560px;
    }
}

/* Commit 22 — mobile calendar fix */

@media (max-width: 768px) {
    .calendar-weekdays,
    .calendar-grid,
    .calendar-month-grid,
    .calendar-weekdays-minimal {
        display: grid;
        grid-template-columns: repeat(7, minmax(42px, 1fr));
        min-width: 0;
        gap: 6px;
    }

    .calendar-weekdays {
        display: grid;
    }

    .calendar-month-card,
    .calendar-wrapper,
    .calendar-planner-wrapper {
        overflow-x: visible;
    }

    .calendar-month-day,
    .calendar-day {
        min-height: 54px;
        padding: 8px 4px;
        border-radius: 12px;
    }

    .calendar-month-number {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .calendar-dots {
        margin-top: 6px;
        justify-content: center;
    }

    .calendar-dot {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 480px) {
    .calendar-weekdays,
    .calendar-grid,
    .calendar-month-grid,
    .calendar-weekdays-minimal {
        grid-template-columns: repeat(7, minmax(36px, 1fr));
        gap: 4px;
    }

    .calendar-month-card {
        padding: 12px;
        border-radius: 18px;
    }

    .calendar-month-day,
    .calendar-day {
        min-height: 48px;
        padding: 6px 3px;
        border-radius: 10px;
    }

    .calendar-month-number {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
}


/* Commit 22 — mobile calendar selected day polish */

@media (max-width: 768px) {
    .calendar-month-day {
        position: relative;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
    }

    .calendar-month-number {
        position: static;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        border-radius: 999px;
        background: transparent;
        color: #172033;
        line-height: 1;
    }

    .calendar-month-today .calendar-month-number,
    .calendar-month-selected .calendar-month-number {
        width: 28px;
        height: 28px;
        color: #ffffff;
        font-size: 14px;
    }

    .calendar-month-today .calendar-month-number {
        background: #ff3b4f;
    }

    .calendar-month-selected .calendar-month-number {
        background: #4f6df5;
    }

    .calendar-month-selected {
        border-color: #4f6df5;
        background: #f5f7ff;
    }

    .calendar-month-today {
        border-color: #ff3b4f;
        background: #fff6f7;
    }
}

@media (max-width: 480px) {
    .calendar-month-today .calendar-month-number,
    .calendar-month-selected .calendar-month-number {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }
}
