/* === Variables === */
:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-bg: #F0EEEB;
    --primary-dark: #1B5E20;
    --primary-pale: #E8F5E9;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --red: #D32F2F;
    --red-light: #FFEBEE;
    --red-soft: #EF5350;
    --yellow: #F9A825;
    --yellow-light: #FFF8E1;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.1);
    --shadow: 0 2px 10px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.14);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --nav-height: 68px;
    --header-height: 0px;
    --transition: 0.2s ease;
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--primary-bg);
    color: var(--gray-900);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes checkmark {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes progressFill {
    from { width: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.view {
    animation: fadeIn 0.2s ease;
}

/* === Login === */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: linear-gradient(160deg, #1B5E20 0%, #2E7D32 40%, #43A047 70%, #66BB6A 100%);
}

.login-logo {
    font-size: 72px;
    margin-bottom: 4px;
    animation: fadeInScale 0.6s ease;
}

.login-container h1,
.login-container h2 {
    color: var(--white);
    margin-bottom: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.login-container .login-subtitle {
    color: rgba(255,255,255,0.75);
    margin-bottom: 28px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 400;
}

.login-container p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
    text-align: center;
}

.login-container form {
    width: 100%;
    max-width: 360px;
    background: var(--white);
    padding: 28px 24px;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.5s ease 0.2s both;
}

/* === Forms === */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--gray-50);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-group input[type="color"] {
    width: 60px;
    height: 44px;
    padding: 4px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--gray-50);
}

/* === Cycle Input === */
.cycle-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cycle-prefix {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

.cycle-number {
    width: 70px;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
    background: var(--gray-50);
    -webkit-appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.cycle-number:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.cycle-unit {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--gray-50);
    -webkit-appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.cycle-unit:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

.form-card {
    margin: 16px;
    padding: 20px;
}

/* === Task Form === */
.task-form-container {
    padding: 16px 16px 120px;
}

.form-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
    animation: fadeIn 0.25s ease both;
}

.form-section:nth-child(2) { animation-delay: 0.05s; }
.form-section:nth-child(3) { animation-delay: 0.1s; }
.form-section:nth-child(4) { animation-delay: 0.15s; }
.form-section:nth-child(5) { animation-delay: 0.2s; }
.form-section:nth-child(6) { animation-delay: 0.25s; }

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
}

.task-title-input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 2px solid var(--gray-200);
    font-size: 1.15rem;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: var(--gray-900);
    transition: border-color var(--transition);
}

.task-title-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.task-title-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.task-desc-input {
    width: 100%;
    padding: 10px 0 0;
    border: none;
    font-size: 0.9rem;
    font-family: inherit;
    background: transparent;
    color: var(--gray-600);
    resize: vertical;
    min-height: 36px;
}

.task-desc-input:focus { outline: none; }

.task-desc-input::placeholder { color: var(--gray-400); }

.form-row {
    display: flex;
    gap: 12px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.form-section .form-group {
    margin-bottom: 0;
}

.form-section .form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.form-section .form-group select,
.form-section .form-group input[type="date"] {
    border: 2px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    padding: 11px 12px;
}

.form-section .form-group select:focus,
.form-section .form-group input[type="date"]:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-section .cycle-number,
.form-section .cycle-unit {
    border: 2px solid var(--gray-200);
    background: var(--gray-50);
    padding: 11px 12px;
}

.form-section .cycle-number:focus,
.form-section .cycle-unit:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-section input[type="date"] {
    width: 100%;
    padding: 11px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--gray-50);
    -webkit-appearance: none;
}

.form-section input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-actions-sticky {
    position: fixed;
    bottom: var(--nav-height);
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--gray-200);
    z-index: 50;
}

.form-actions-sticky .btn { flex: 1; }

.form-actions-sticky .btn-icon-label {
    flex: 0 0 52px;
    padding: 12px;
}

.form-actions-sticky .btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.form-actions-sticky .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (min-width: 600px) {
    .form-actions-sticky {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
    }
}

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

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

/* === Weekday Selector === */
.weekday-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.weekday-chip {
    display: flex !important;
    cursor: pointer;
}

.weekday-chip input { display: none; }

.weekday-chip span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 2px solid var(--gray-200);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: all var(--transition);
    user-select: none;
    background: var(--gray-50);
}

.weekday-chip input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    min-height: 52px;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover { background: var(--gray-200); }
.btn-secondary:active { transform: scale(0.97); }

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-block { width: 100%; }

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--gray-500);
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-icon svg {
    width: 22px;
    height: 22px;
}

.btn-icon-sm {
    background: none;
    border: none;
    font-size: 1.1rem;
    padding: 6px;
    cursor: pointer;
    min-height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--gray-500);
    transition: all var(--transition);
}

.btn-icon-sm:hover { background: var(--gray-100); }

.btn-fab {
    position: fixed;
    bottom: calc(var(--nav-height) + 20px);
    right: 20px;
    width: 58px;
    height: 58px;
    border-radius: 29px;
    background: var(--primary);
    color: var(--white);
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(46,125,50,0.35);
    z-index: 10;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.btn-fab:hover {
    background: var(--primary-dark);
    transform: scale(1.06);
    box-shadow: 0 6px 24px rgba(46,125,50,0.4);
}

.btn-fab:active { transform: scale(0.95); }

/* === Greeting Header === */
.greeting-header {
    padding: 24px 20px 8px;
}

.greeting-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.greeting-date {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 2px;
    font-weight: 500;
}

/* === Progress Bar === */
.progress-section {
    padding: 12px 20px 4px;
}

.progress-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-count {
    color: var(--primary);
    font-weight: 700;
}

.progress-bar-bg {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressFill 0.8s ease;
}

.progress-message {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
    text-align: center;
    padding: 4px 0;
}

.progress-message-done {
    color: var(--primary);
    font-weight: 600;
}

/* === App Header (minimal) === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    z-index: 100;
    display: none;
}

/* === Logout button floats top-right === */
.header-floating {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-floating .btn-icon {
    background: var(--white);
    box-shadow: var(--shadow);
    color: var(--gray-500);
}

.header-floating .btn-icon:hover {
    background: var(--gray-50);
    color: var(--gray-700);
}

/* === Main Content === */
.main-content {
    margin-bottom: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    padding-bottom: 20px;
}

/* === Section Headers === */
.section-header {
    padding: 20px 20px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
    background: var(--gray-400);
}

.section-header.overdue .section-title { color: var(--red); }
.section-header.overdue .section-badge { background: var(--red); }
.section-header.today .section-title { color: var(--primary); }
.section-header.today .section-badge { background: var(--primary); }

/* === Filter Bar === */
.filter-bar-container {
    padding: 12px 20px;
    display: flex;
    gap: 8px;
}

.filter-select {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    min-height: 44px;
    color: var(--gray-700);
    -webkit-appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

/* === Task Cards === */
.tasks-list {
    padding: 0 20px;
}

.task-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    overflow: hidden;
    display: flex;
    position: relative;
    transition: box-shadow 0.15s ease;
}

.task-card-body {
    flex: 1;
    padding: 14px 0 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
}

.task-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.task-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--gray-900);
    word-break: break-word;
    letter-spacing: -0.01em;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 500;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.task-due {
    font-weight: 600;
}

.task-due.overdue { color: var(--red); }
.task-due.today { color: var(--yellow); }
.task-due.upcoming { color: var(--primary); }

.task-motivation {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.3;
}

/* === Checkbox Zone (right side) === */
.task-check-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    flex-shrink: 0;
    border-left: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background var(--transition);
}

.task-check-zone:hover {
    background: var(--primary-pale);
}

.task-checkbox {
    width: 32px;
    height: 32px;
    border: 2.5px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    transition: all var(--transition);
    color: transparent;
    font-size: 0.9rem;
}

.task-check-zone:hover .task-checkbox {
    border-color: var(--primary);
    color: var(--primary-light);
}

.task-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    animation: checkmark 0.4s ease;
}

/* === Swipe to delete === */
.task-card-wrapper {
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: var(--radius);
    animation: fadeIn 0.3s ease both;
}

/* Staggered animation on wrappers */
.task-card-wrapper:nth-of-type(1) { animation-delay: 0s; }
.task-card-wrapper:nth-of-type(2) { animation-delay: 0.03s; }
.task-card-wrapper:nth-of-type(3) { animation-delay: 0.06s; }
.task-card-wrapper:nth-of-type(4) { animation-delay: 0.09s; }
.task-card-wrapper:nth-of-type(5) { animation-delay: 0.12s; }
.task-card-wrapper:nth-of-type(6) { animation-delay: 0.15s; }
.task-card-wrapper:nth-of-type(7) { animation-delay: 0.18s; }
.task-card-wrapper:nth-of-type(8) { animation-delay: 0.21s; }
.task-card-wrapper:nth-of-type(9) { animation-delay: 0.24s; }
.task-card-wrapper:nth-of-type(10) { animation-delay: 0.27s; }

.task-card-wrapper .task-card,
.task-card-wrapper .category-card,
.task-card-wrapper .user-card {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    animation: none;
}

.swipe-delete-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 24px;
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.task-card-wrapper.swiping .swipe-delete-bg {
    opacity: 1;
    pointer-events: auto;
}

.swipe-delete-bg:hover {
    background: #B71C1C;
}

.swipe-delete-bg:active {
    background: #C62828;
}

.swipe-delete-bg svg {
    width: 26px;
    height: 26px;
}

/* === Reminders in cards === */
.task-card.overdue-card {
    border-left: 3px solid var(--red);
}

.task-card.today-card {
    border-left: 3px solid var(--primary);
}

/* === Categories List === */
.categories-list, .users-list {
    padding: 16px 20px 100px;
}

.category-card, .user-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: fadeIn 0.3s ease both;
}

.category-card:nth-child(1) { animation-delay: 0s; }
.category-card:nth-child(2) { animation-delay: 0.03s; }
.category-card:nth-child(3) { animation-delay: 0.06s; }
.category-card:nth-child(4) { animation-delay: 0.09s; }
.category-card:nth-child(5) { animation-delay: 0.12s; }

.category-icon {
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.category-info, .user-info {
    flex: 1;
    min-width: 0;
}

.category-name, .user-name {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.category-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.user-role {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: 2px;
}

/* === Settings === */
.settings-card {
    margin: 16px 20px;
    padding: 20px;
}

.settings-card h3 {
    margin-bottom: 8px;
    color: var(--gray-800);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.settings-card .btn {
    margin-top: 12px;
}

/* === Card === */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* === Bottom Navigation === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: stretch;
    border-top: 1px solid var(--gray-200);
    z-index: 100;
    padding: 0 8px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-400);
    font-family: inherit;
    transition: color var(--transition);
    padding: 8px 4px;
    position: relative;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item .nav-pill {
    position: absolute;
    top: 6px;
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: var(--primary-pale);
    opacity: 0;
    transition: opacity var(--transition);
}

.nav-item.active .nav-pill {
    opacity: 1;
}

.nav-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    letter-spacing: 0.02em;
}

/* === Modal === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    animation: fadeIn 0.15s ease;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 20px;
    animation: fadeInScale 0.2s ease;
    box-sizing: border-box;
}

.modal-content h3 {
    margin-bottom: 16px;
    color: var(--gray-800);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--gray-800);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 28px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 300;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: calc(100% - 40px);
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === Utilities === */
.text-muted {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.error-message {
    color: var(--red);
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--gray-400);
    animation: fadeIn 0.4s ease;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state-text {
    font-size: 0.95rem;
    font-weight: 500;
}

[hidden] {
    display: none !important;
}

/* === Loading Spinner === */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === Responsive: Tablet+ === */
@media (min-width: 600px) {
    .main-content {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .login-container form {
        padding: 36px 32px;
    }

    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
    }

    .btn-fab {
        right: calc(50% - 280px);
    }

    .greeting-header,
    .progress-section,
    .filter-bar-container,
    .tasks-list,
    .categories-list,
    .users-list,
    .settings-card {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}
