/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #fafaf9;
    color: #1c1917;
    line-height: 1.5;
    font-weight: 400;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--small {
    max-width: 560px;
}

.container--medium {
    max-width: 800px;
}

/* HEADER */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e7e5e4;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.96);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: #0c4a6e;
}

.nav__list {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav__link {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #44403c;
    transition: color 0.2s ease;
}

.nav__link:hover {
    color: #0c4a6e;
}

/* MAIN & PAGES */
.main {
    min-height: calc(100vh - 130px);
}

.page {
    display: none;
    padding: 48px 0 64px;
}

.page.active {
    display: block;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    background: none;
    font-family: inherit;
    text-align: center;
}

.btn--primary {
    background-color: #0c4a6e;
    color: white;
    border-color: #0c4a6e;
}

.btn--primary:hover {
    background-color: #075a8b;
}

.btn--outline {
    border-color: #d6d3d1;
    background: white;
    color: #1c1917;
}

.btn--outline:hover {
    background-color: #f5f5f4;
    border-color: #a8a29e;
}

.btn--small {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 10px;
}

.btn--full {
    width: 100%;
}

.btn--danger {
    background-color: #fff1f0;
    border-color: #fecaca;
    color: #b91c1c;
}

.btn--danger:hover {
    background-color: #fee2e2;
    border-color: #fec5c5;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    color: #57534e;
    transition: background 0.1s;
}

.btn-icon:hover {
    background-color: #f1f5f9;
}

/* HERO (ГЛАВНАЯ) */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0c4a6e;
    margin-bottom: 16px;
}

.hero__subtitle {
    font-size: 1.2rem;
    color: #57534e;
    max-width: 680px;
    margin: 0 auto 32px;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* FEATURES */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin: 48px 0;
}

.feature-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #e7e5e4;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.feature-card p {
    color: #57534e;
    font-size: 0.9rem;
}

.info-block {
    background: #f1f5f9;
    border-radius: 24px;
    padding: 32px;
    margin-top: 32px;
    border-left: 4px solid #0c4a6e;
}

.info-block h2 {
    font-weight: 500;
    margin-bottom: 12px;
}

/* FORM CARD */
.form-card {
    background: white;
    border-radius: 28px;
    padding: 32px;
    border: 1px solid #e7e5e4;
    box-shadow: 0 8px 20px rgba(0,0,0,0.02);
}

.form-card h2 {
    margin-bottom: 28px;
    font-weight: 600;
    font-size: 1.8rem;
}

.form__group {
    margin-bottom: 20px;
}

.form__group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form__group input,
.form__group select,
.form__group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #d6d3d1;
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    transition: 0.15s;
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
    outline: none;
    border-color: #0c4a6e;
    box-shadow: 0 0 0 2px rgba(12,74,110,0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

.form__footnote {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #78716c;
}

.form__footnote a {
    color: #0c4a6e;
    text-decoration: none;
    font-weight: 500;
}

/* PROFILE (СПИСКИ) */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.list-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #e7e5e4;
    transition: box-shadow 0.1s;
}

.list-card h3 {
    font-weight: 600;
    margin-bottom: 8px;
}

.list-card p {
    font-size: 0.85rem;
    color: #78716c;
    margin-bottom: 16px;
}

.list-card__actions {
    display: flex;
    gap: 12px;
}

.list-card--public {
    background: #fefce8;
    border-color: #fde047;
}

.public-lists h3 {
    margin-bottom: 20px;
    font-weight: 500;
}

/* СТРАНИЦА СПИСКА (задачи) */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e7e5e4;
}

.list-meta {
    font-size: 0.8rem;
    color: #78716c;
    margin-top: 6px;
}

.list-actions {
    display: flex;
    gap: 12px;
}

.tasks-section {
    margin: 32px 0;
}

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

.tasks-list {
    list-style: none;
    border: 1px solid #e7e5e4;
    border-radius: 20px;
    overflow: hidden;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: white;
}

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

.task-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-text {
    font-weight: 500;
}

.task-term {
    font-size: 0.7rem;
    color: #a16207;
    background: #fffbeb;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

.task-actions {
    display: flex;
    gap: 6px;
}

/* SHARE SECTION */
.share-section {
    background: #fafaf9;
    border-radius: 20px;
    padding: 24px;
    margin-top: 32px;
    border: 1px solid #e7e5e4;
}

.share-control {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.share-control input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 40px;
    border: 1px solid #d6d3d1;
}

.shared-users {
    list-style: none;
    margin-top: 16px;
}

.shared-users li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e7e5e4;
}

/* DANGER ZONE */
.form__danger-zone {
    margin: 28px 0 24px;
    padding: 20px;
    background: #fef2f2;
    border-radius: 20px;
    border: 1px solid #fecaca;
}

.form__danger-zone h4 {
    margin-bottom: 12px;
    color: #991b1b;
}

.form__buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* FOOTER */
.footer {
    border-top: 1px solid #e7e5e4;
    padding: 32px 0;
    background: white;
    text-align: center;
    color: #78716c;
    font-size: 0.85rem;
}

.footer__copy {
    margin-top: 8px;
    font-size: 0.75rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header__container {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 12px;
    }
    .nav__list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    .hero h1 {
        font-size: 2.4rem;
    }
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .list-header {
        flex-direction: column;
        gap: 16px;
    }
}
/* ТЁМНАЯ ТЕМА */
body.dark-theme {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

body.dark-theme .header {
    background: #1e293b !important;
}

body.dark-theme .form-card,
body.dark-theme .list-card,
body.dark-theme .profile-card,
body.dark-theme .profile-lists {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .nav__link {
    color: #cbd5e1 !important;
}

body.dark-theme .footer {
    background: #0f172a !important;
}

body.dark-theme .task-item {
    background: #1e293b !important;
    border-color: #334155 !important;
}
/* Аватарка в шапке */
.nav__avatar {
    margin-left: 10px;
}

.header-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0c4a6e;
}

.header-avatar-placeholder {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
}

body.dark-theme .header-avatar {
    border-color: #818cf8;
    .expired-badge {
    background: #fee2e2;
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    margin-top: 10px;
    display: inline-block;
}

body.dark-theme .expired-badge {
    background: #7f1d1d;
    color: #fecaca;
}
}