@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap');

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --sage: #C9A84C;
            --eucalyptus: #B8963E;
            --slate: #8B6914;
            --dark: #2C3E50;
            --cream: #FAF9F6;
            --white: #FFFFFF;
            --shadow: rgba(44, 62, 80, 0.08);
            --border: rgba(180, 140, 50, 0.28);
            --header-control-height: 2.5rem;
        }

        body {
            font-family: 'Lora', serif;
            background: linear-gradient(135deg, #F5F0E8 0%, #EDE5D5 100%);
            min-height: 100vh;
            color: var(--dark);
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 0.9rem;
            color: var(--dark);
            font-weight: 500;
        }

        input[type="text"],
        input[type="email"],
        input[type="password"] {
            width: 100%;
            padding: 0.875rem 1rem;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
            font-family: 'Helvetica Neue', sans-serif;
            transition: all 0.2s;
            background: var(--cream);
        }

        input:focus,
        textarea:focus {
            outline: none;
            border-color: var(--sage);
            background: var(--white);
        }

        select {
            padding: 0.5rem 1rem;
            border: 2px solid var(--border);
            border-radius: 6px;
            font-family: 'Helvetica Neue', sans-serif;
            background: var(--white);
            cursor: pointer;
            transition: all 0.2s;
        }

        select:focus {
            outline: none;
            border-color: var(--sage);
        }

        .btn {
            width: 100%;
            padding: 1rem;
            background: linear-gradient(135deg, var(--sage), var(--eucalyptus));
            color: var(--white);
            border: none;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            font-family: 'Helvetica Neue', sans-serif;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 1rem;
            text-align: center;
            text-decoration: none;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(132, 181, 159, 0.3);
        }

        .btn-secondary {
            padding: 0.625rem 1.25rem;
            background: var(--white);
            border: 2px solid var(--sage);
            color: var(--sage);
            border-radius: 6px;
            font-family: 'Helvetica Neue', sans-serif;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.2rem;
            height: 2.2rem;
            padding: 0;
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--sage);
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            flex-shrink: 0;
        }

        .btn-icon:hover {
            background: var(--sage);
            color: var(--white);
        }

        .btn-secondary:hover {
            background: var(--sage);
            color: var(--white);
        }

        .btn-primary {
            padding: 0.625rem 1.25rem;
            background: linear-gradient(135deg, var(--sage), var(--eucalyptus));
            border: none;
            color: var(--white);
            border-radius: 6px;
            font-family: 'Helvetica Neue', sans-serif;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(132, 181, 159, 0.3);
        }

        .hidden {
            display: none !important;
        }

        .section {
            background: var(--white);
            border-radius: 16px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 20px var(--shadow);
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .section-title {
            font-size: 1.5rem;
            color: var(--dark);
        }

        .breadcrumb {
            padding: 1rem 0;
            font-family: 'Helvetica Neue', sans-serif;
            color: var(--slate);
            font-size: 0.9rem;
        }

        .breadcrumb a {
            color: var(--sage);
            text-decoration: none;
            cursor: pointer;
        }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

        /* Console Screens */
        .console {
            display: none;
            min-height: 100vh;
        }

        .console.active {
            display: block;
        }

        .header {
            background: var(--white);
            padding: 1.5rem 0;
            box-shadow: 0 2px 12px var(--shadow);
        }

        .header-inner {
            max-width: 1800px;
            margin: 0 auto;
            padding: 0 1.25rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .header-logo {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--sage), var(--eucalyptus));
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }

        .header-title {
            font-size: 1.25rem;
            color: var(--dark);
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            font-family: 'Helvetica Neue', sans-serif;
        }

        .account-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            height: var(--header-control-height);
            padding: 0 1rem;
        }

        .account-btn svg {
            flex-shrink: 0;
        }

        .task-bell-wrapper {
            position: relative;
        }

        .task-bell-btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: var(--header-control-height);
            height: var(--header-control-height);
            border: 2px solid var(--sage);
            border-radius: 999px;
            background: var(--white);
            color: var(--sage);
            cursor: pointer;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
        }

        .task-bell-btn:hover,
        .task-bell-btn.is-open {
            background: var(--sage);
            color: var(--white);
            border-color: var(--sage);
        }

        .task-bell-btn-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1rem;
            height: 1rem;
            pointer-events: none;
        }

        .task-bell-icon-letter {
            color: inherit;
            font-family: Georgia, 'Times New Roman', serif;
            font-size: 1.35rem;
            font-style: normal;
            font-weight: 700;
            line-height: 1;
            font-style: italic;
            transform: translateY(-0.06em);
        }

        .task-bell-count {
            position: absolute;
            top: -0.3rem;
            right: -0.25rem;
            min-width: 1.2rem;
            height: 1.2rem;
            padding: 0 0.3rem;
            border-radius: 999px;
            background: #d45555;
            color: var(--white);
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 0.72rem;
            font-weight: 700;
            line-height: 1.2rem;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .task-panel {
            position: absolute;
            top: calc(100% + 0.75rem);
            right: 0;
            width: min(420px, calc(100vw - 2rem));
            max-height: min(70vh, 560px);
            overflow: hidden;
            display: none;
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 14px;
            box-shadow: 0 18px 50px rgba(44, 62, 80, 0.18);
            z-index: 1300;
        }

        .task-panel.is-open {
            display: block;
        }

        .task-panel-header {
            padding: 1rem 1rem 0.75rem;
            border-bottom: 1px solid rgba(180, 140, 50, 0.16);
            background: linear-gradient(180deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.02));
        }

        .task-panel-title {
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 0.92rem;
            font-weight: 700;
            color: var(--dark);
        }

        .task-panel-list {
            display: flex;
            flex-direction: column;
            max-height: calc(min(70vh, 560px) - 56px);
            overflow-y: auto;
        }

        .task-panel-empty {
            padding: 1rem;
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 0.9rem;
            color: var(--slate);
        }

        .task-panel-item {
            display: block;
            padding: 0.9rem 1rem;
            border-bottom: 1px solid rgba(180, 140, 50, 0.12);
            color: inherit;
            text-decoration: none;
            transition: background 0.15s ease;
        }

        .task-panel-item:hover {
            background: rgba(201, 168, 76, 0.08);
        }

        .task-panel-item.is-active {
            background: rgba(201, 168, 76, 0.12);
        }

        .task-panel-item.is-unread .task-panel-message {
            font-weight: 700;
        }

        .task-panel-message {
            display: block;
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 0.88rem;
            line-height: 1.45;
            color: var(--dark);
        }

        .task-panel-status {
            display: inline-block;
            margin-top: 0.35rem;
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 0.72rem;
            color: var(--slate);
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .header-menu-wrapper {
            position: relative;
        }

        .header-menu-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: var(--header-control-height);
            height: var(--header-control-height);
            background: transparent;
            border: 2px solid var(--border);
            border-radius: 6px;
            color: var(--dark);
            cursor: pointer;
            font-size: 1.2rem;
            transition: all 0.2s;
        }

        .header-menu-btn:hover {
            border-color: var(--sage);
            color: var(--sage);
        }

        .header-menu-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 6px);
            right: 0;
            min-width: 200px;
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.10);
            z-index: 1000;
            padding: 0.4rem 0;
        }

        .header-menu-dropdown.is-open {
            display: block;
        }

        .header-menu-item {
            display: block;
            padding: 0.6rem 1rem;
            color: var(--dark);
            text-decoration: none;
            font-size: 0.8rem;
            font-family: 'Helvetica Neue', sans-serif;
            transition: background 0.15s;
        }

        .header-menu-item:hover {
            background: var(--cream, #f5f5f0);
        }

        .logout-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: var(--header-control-height);
            padding: 0 1.25rem;
            background: var(--white);
            border: 2px solid var(--sage);
            border-radius: 6px;
            color: var(--sage);
            cursor: pointer;
            font-size: 0.8rem;
            font-family: 'Helvetica Neue', sans-serif;
            font-weight: 500;
            transition: all 0.2s;
        }

        .logout-btn:hover {
            background: var(--sage);
            border-color: var(--sage);
            color: var(--white);
        }

        .logout-btn-strong {
            font-weight: 600;
        }


        .main-content {
            max-width: 1800px;
            margin: 0 auto;
            padding: 1.25rem;
        }

        h1 {
            font-size: 1.75rem;
            color: var(--dark);
            margin-bottom: 0.5rem;
        }

        .lang-toggle {
            padding: 0.35rem 0.75rem;
            background: transparent;
            border: 2px solid var(--border);
            border-radius: 6px;
            color: var(--dark);
            cursor: pointer;
            font-family: 'Helvetica Neue', sans-serif;
            font-weight: 600;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .lang-toggle:hover {
            border-color: var(--sage);
            color: var(--sage);


        }

        input#accountEmail {
            width: 100%;
            box-sizing: border-box;
            font-size: 16px;
            padding-top: 14px;
            padding-bottom: 14px;
            height: auto;
            /* Ensures height is adjusted by padding and font-size */
            border-style: solid;
            border-color: rgba(80, 128, 142, 0.28);
            border-radius: 8px;
            background-color: rgb(232, 240, 254);
            padding-left: 16px;
            padding-right: 16px;
            font-family: "Helvetica Neue", sans-serif;
        }

        .status-message {
            background: linear-gradient(135deg, #E8F4F8, #D4E8E4);
            border-left: 4px solid var(--sage);
            padding: 1rem 1.5rem;
            border-radius: 8px;
            margin-bottom: 1.5rem;
            font-family: 'Helvetica Neue', sans-serif;
            animation: slideIn 0.3s ease-out;
        }

        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: var(--white);
            animation: spin 1s linear infinite;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

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

        @keyframes spinner-grow {
            0% {
                transform: scale(0.3);
                opacity: 0.2;
            }

            50% {
                transform: scale(1);
                opacity: 1;
            }

            100% {
                transform: scale(0.3);
                opacity: 0.2;
            }
        }
