.edrp-app,
.edrp-app * {
    box-sizing: border-box;
}

.edrp-app {
    --edrp-accent: #7c5cff;
    --edrp-accent-2: #37d6c6;
    --edrp-ink: #f8f8ff;
    --edrp-muted: #aeb4c9;
    --edrp-panel: rgba(16, 18, 34, 0.84);
    --edrp-panel-strong: #15182c;
    --edrp-line: rgba(255, 255, 255, 0.1);
    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 24px auto;
    padding: clamp(18px, 3vw, 34px);
    overflow: hidden;
    color: var(--edrp-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--edrp-accent) 35%, transparent), transparent 35%),
        radial-gradient(circle at 100% 40%, rgba(55, 214, 198, 0.16), transparent 30%),
        linear-gradient(145deg, #090b18 0%, #111428 48%, #090b17 100%);
    box-shadow: 0 32px 80px rgba(3, 5, 17, 0.32);
}

.edrp-app button,
.edrp-app input,
.edrp-app select,
.edrp-app textarea {
    font: inherit;
}

.edrp-app button {
    -webkit-tap-highlight-color: transparent;
}

.edrp-glow {
    position: absolute;
    z-index: -1;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.28;
    pointer-events: none;
}

.edrp-glow-one {
    top: -130px;
    right: 18%;
    background: var(--edrp-accent);
}

.edrp-glow-two {
    right: -150px;
    bottom: 12%;
    background: var(--edrp-accent-2);
}

.edrp-hero,
.edrp-dashboard,
.edrp-main-grid,
.edrp-section-heading,
.edrp-tool-head,
.edrp-dialog-head,
.edrp-date-row,
.edrp-stat-row,
.edrp-task-topline,
.edrp-timer-actions,
.edrp-dialog-actions,
.edrp-form-row {
    display: flex;
}

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

.edrp-hero-copy {
    max-width: 760px;
}

.edrp-kicker,
.edrp-eyebrow {
    display: inline-block;
    color: #bfbbff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.edrp-hero h2 {
    max-width: 720px;
    margin: 8px 0 8px;
    color: #fff;
    font-size: clamp(2rem, 4.8vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.edrp-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--edrp-muted);
    font-size: clamp(0.98rem, 1.6vw, 1.14rem);
}

.edrp-date-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
    color: #dfe2ef;
    font-size: 0.9rem;
}

.edrp-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5ee28a;
    box-shadow: 0 0 0 5px rgba(94, 226, 138, 0.12);
}

.edrp-streak {
    padding-left: 10px;
    border-left: 1px solid var(--edrp-line);
    color: #ffd89d;
}

.edrp-hero-actions {
    display: grid;
    min-width: 145px;
    gap: 10px;
}

.edrp-icon-btn,
.edrp-primary-btn,
.edrp-secondary-btn,
.edrp-filter,
.edrp-presets button,
.edrp-exercise,
.edrp-water,
.edrp-check,
.edrp-close-add {
    position: relative;
    overflow: hidden;
    border: 0;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.edrp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    padding: 10px 14px;
    color: #e9ebf6;
    border: 1px solid var(--edrp-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.055);
}

.edrp-icon-btn:hover,
.edrp-secondary-btn:hover,
.edrp-filter:hover,
.edrp-presets button:hover,
.edrp-exercise:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.edrp-dashboard {
    align-items: stretch;
    gap: 18px;
    margin-bottom: 22px;
}

.edrp-progress-card,
.edrp-focus-card,
.edrp-routine-panel,
.edrp-tool-card {
    border: 1px solid var(--edrp-line);
    background: var(--edrp-panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(16px);
}

.edrp-progress-card {
    display: flex;
    align-items: center;
    flex: 1.5;
    gap: clamp(18px, 3vw, 34px);
    min-width: 0;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 22px;
}

.edrp-progress-ring {
    --progress: 0;
    display: grid;
    flex: 0 0 auto;
    width: 132px;
    height: 132px;
    padding: 10px;
    border-radius: 50%;
    background: conic-gradient(var(--edrp-accent-2) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.08) 0);
    box-shadow: 0 0 38px rgba(55, 214, 198, 0.13);
    place-items: center;
    transition: background 350ms ease;
}

.edrp-progress-inner {
    display: grid;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #111426;
    text-align: center;
    place-content: center;
}

.edrp-progress-value {
    color: #fff;
    font-size: 1.65rem;
    line-height: 1;
}

.edrp-progress-inner span {
    margin-top: 5px;
    color: var(--edrp-muted);
    font-size: 0.72rem;
}

.edrp-progress-copy {
    min-width: 0;
    flex: 1;
}

.edrp-progress-copy h3,
.edrp-focus-card label,
.edrp-section-heading h3,
.edrp-tool-card h3,
.edrp-dialog-head h3 {
    margin: 5px 0 0;
    color: #fff;
    line-height: 1.2;
}

.edrp-progress-copy h3 {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.edrp-progress-track {
    height: 8px;
    margin: 17px 0 12px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
}

.edrp-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--edrp-accent), var(--edrp-accent-2));
    box-shadow: 0 0 16px color-mix(in srgb, var(--edrp-accent) 45%, transparent);
    transition: width 350ms ease;
}

.edrp-stat-row {
    justify-content: space-between;
    gap: 18px;
    color: var(--edrp-muted);
    font-size: 0.86rem;
}

.edrp-stat-row b {
    color: #fff;
}

.edrp-focus-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 270px;
    padding: 22px;
    border-radius: 22px;
}

.edrp-focus-card label {
    display: block;
    margin-bottom: 11px;
    font-size: 1.05rem;
}

.edrp-intention {
    width: 100%;
    min-height: 90px;
    flex: 1;
    resize: vertical;
    color: #f7f7ff;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.045);
    padding: 13px 14px;
}

.edrp-intention:focus,
.edrp-add-form input:focus,
.edrp-add-form select:focus {
    border-color: var(--edrp-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--edrp-accent) 22%, transparent);
}

.edrp-saved-indicator {
    margin-top: 8px;
    color: #75d9c6;
    font-size: 0.75rem;
    opacity: 0.75;
}

.edrp-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 7px;
    overflow-x: auto;
    border: 1px solid var(--edrp-line);
    border-radius: 16px;
    background: rgba(10, 12, 25, 0.62);
    scrollbar-width: thin;
}

.edrp-filter {
    flex: 0 0 auto;
    padding: 9px 13px;
    color: var(--edrp-muted);
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    font-size: 0.86rem;
    font-weight: 700;
}

.edrp-filter.is-active {
    color: #fff;
    border-color: color-mix(in srgb, var(--edrp-accent) 45%, transparent);
    background: color-mix(in srgb, var(--edrp-accent) 20%, transparent);
    box-shadow: 0 7px 22px color-mix(in srgb, var(--edrp-accent) 14%, transparent);
}

.edrp-main-grid {
    align-items: flex-start;
    gap: 18px;
}

.edrp-routine-panel {
    min-width: 0;
    flex: 1;
    padding: clamp(16px, 2.5vw, 24px);
    border-radius: 24px;
}

.edrp-section-heading {
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 17px;
}

.edrp-section-heading h3,
.edrp-tool-card h3,
.edrp-dialog-head h3 {
    font-size: 1.28rem;
}

.edrp-primary-btn,
.edrp-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 12px;
    font-weight: 800;
}

.edrp-primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--edrp-accent), color-mix(in srgb, var(--edrp-accent) 68%, #20cfc0));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--edrp-accent) 24%, transparent);
}

.edrp-primary-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--edrp-accent) 34%, transparent);
}

.edrp-secondary-btn {
    color: #e7e9f5;
    border: 1px solid var(--edrp-line);
    background: rgba(255, 255, 255, 0.06);
}

.edrp-task-list {
    display: grid;
    gap: 10px;
}

.edrp-task {
    position: relative;
    display: grid;
    grid-template-columns: 42px 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 92px;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.035);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.edrp-task:hover {
    transform: translateX(3px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.055);
}

.edrp-task[hidden] {
    display: none;
}

.edrp-task.is-complete {
    border-color: rgba(66, 222, 178, 0.22);
    background: rgba(38, 174, 142, 0.075);
}

.edrp-task.is-complete .edrp-task-copy h4,
.edrp-task.is-complete .edrp-task-copy p {
    opacity: 0.55;
}

.edrp-task.is-complete .edrp-task-copy h4 {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.edrp-check {
    display: grid;
    width: 34px;
    height: 34px;
    color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.16);
    place-items: center;
}

.edrp-check:hover {
    transform: scale(1.08);
    border-color: var(--edrp-accent-2);
}

.edrp-task.is-complete .edrp-check {
    color: #071816;
    border-color: var(--edrp-accent-2);
    background: var(--edrp-accent-2);
    box-shadow: 0 0 20px rgba(55, 214, 198, 0.26);
}

.edrp-checkmark {
    font-weight: 1000;
}

.edrp-task-icon {
    display: grid;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
    font-size: 1.25rem;
    place-items: center;
}

.edrp-task-copy {
    min-width: 0;
}

.edrp-task-topline {
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.edrp-task-topline time,
.edrp-task-topline span {
    color: #9ea7c3;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.edrp-task-topline span {
    padding-left: 8px;
    border-left: 1px solid var(--edrp-line);
}

.edrp-task-copy h4 {
    margin: 0;
    color: #f8f8ff;
    font-size: 0.98rem;
    line-height: 1.25;
}

.edrp-task-copy p {
    margin: 4px 0 0;
    color: var(--edrp-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.edrp-delete-task {
    display: grid;
    width: 32px;
    height: 32px;
    color: #d7aeb8;
    border: 1px solid rgba(255, 126, 155, 0.12);
    border-radius: 10px;
    background: rgba(255, 91, 128, 0.06);
    cursor: pointer;
    place-items: center;
}

.edrp-delete-task:hover {
    color: #fff;
    background: rgba(255, 91, 128, 0.18);
}

.edrp-empty-state {
    padding: 55px 20px;
    color: var(--edrp-muted);
    text-align: center;
}

.edrp-empty-state span {
    font-size: 2rem;
}

.edrp-empty-state h4 {
    margin: 8px 0 4px;
    color: #fff;
}

.edrp-empty-state p {
    margin: 0;
}

.edrp-side-panel {
    display: grid;
    width: min(100%, 340px);
    flex: 0 0 340px;
    gap: 18px;
}

.edrp-tool-card {
    padding: 20px;
    border-radius: 22px;
}

.edrp-tool-head {
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.edrp-tool-card > p {
    margin: 8px 0 15px;
    color: var(--edrp-muted);
    font-size: 0.84rem;
}

.edrp-water-count,
.edrp-pulse-icon {
    display: grid;
    min-width: 48px;
    height: 48px;
    padding: 0 8px;
    color: #dffcff;
    border: 1px solid rgba(55, 214, 198, 0.2);
    border-radius: 15px;
    background: rgba(55, 214, 198, 0.08);
    place-items: center;
}

.edrp-water-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
}

.edrp-water {
    display: grid;
    aspect-ratio: 1;
    color: #60728a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.04);
    filter: grayscale(1);
    font-size: 1.15rem;
    place-items: center;
}

.edrp-water:hover {
    transform: translateY(-2px) scale(1.03);
}

.edrp-water.is-filled {
    color: #fff;
    border-color: rgba(55, 214, 198, 0.35);
    background: rgba(55, 214, 198, 0.13);
    filter: none;
    box-shadow: 0 7px 18px rgba(55, 214, 198, 0.1);
}

.edrp-timer {
    margin: 15px 0 12px;
    color: #fff;
    font-size: 2.9rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 25px color-mix(in srgb, var(--edrp-accent) 35%, transparent);
}

.edrp-timer.is-running {
    animation: edrp-timer-pulse 1.2s ease-in-out infinite;
}

.edrp-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 11px;
}

.edrp-presets button {
    padding: 7px 5px;
    color: var(--edrp-muted);
    border: 1px solid var(--edrp-line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.78rem;
    font-weight: 800;
}

.edrp-presets button.is-active {
    color: #fff;
    border-color: color-mix(in srgb, var(--edrp-accent) 45%, transparent);
    background: color-mix(in srgb, var(--edrp-accent) 20%, transparent);
}

.edrp-timer-actions {
    gap: 8px;
}

.edrp-timer-actions > * {
    flex: 1;
}

.edrp-mini-workout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 13px;
}

.edrp-exercise {
    padding: 9px 8px;
    color: #d8dbea;
    border: 1px solid var(--edrp-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.74rem;
    font-weight: 700;
}

.edrp-exercise.is-done {
    color: #b8f9df;
    border-color: rgba(55, 214, 198, 0.3);
    background: rgba(55, 214, 198, 0.1);
}

.edrp-anchor-list {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.edrp-anchor-list span {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #dfe2ee;
    font-size: 0.83rem;
}

.edrp-anchor-list i {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: #fff;
    border-radius: 8px;
    background: color-mix(in srgb, var(--edrp-accent) 28%, transparent);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    place-items: center;
}

.edrp-add-panel {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    padding: 20px;
    background: rgba(4, 5, 14, 0.74);
    backdrop-filter: blur(10px);
    place-items: center;
}

.edrp-add-panel[hidden] {
    display: none;
}

.edrp-add-dialog {
    width: min(100%, 540px);
    max-height: min(90vh, 680px);
    padding: clamp(20px, 4vw, 30px);
    overflow-y: auto;
    color: var(--edrp-ink);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 24px;
    background: #111426;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    animation: edrp-dialog-in 220ms ease-out;
}

.edrp-dialog-head {
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.edrp-close-add {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    color: #fff;
    border: 1px solid var(--edrp-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.4rem;
    place-items: center;
}

.edrp-add-form,
.edrp-add-form label {
    display: grid;
    gap: 8px;
}

.edrp-add-form {
    gap: 15px;
}

.edrp-add-form label {
    color: #dde0ed;
    font-size: 0.82rem;
    font-weight: 800;
}

.edrp-add-form input,
.edrp-add-form select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    outline: none;
    background: #191d34;
}

.edrp-add-form select option {
    color: #111;
}

.edrp-form-row {
    gap: 12px;
}

.edrp-form-row > * {
    flex: 1;
}

.edrp-dialog-actions {
    justify-content: flex-end;
    gap: 9px;
    margin-top: 6px;
}

.edrp-toast {
    position: fixed;
    z-index: 100000;
    right: 24px;
    bottom: 24px;
    max-width: min(360px, calc(100vw - 48px));
    padding: 12px 15px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 13px;
    background: #171b30;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.edrp-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.edrp-flash::after {
    position: absolute;
    content: "";
    inset: -30%;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 44%);
    animation: edrp-flash 430ms ease-out forwards;
    pointer-events: none;
}

.edrp-celebrate {
    animation: edrp-celebrate 620ms ease;
}

@keyframes edrp-flash {
    from { opacity: 0.9; transform: scale(0.25); }
    to { opacity: 0; transform: scale(1.3); }
}

@keyframes edrp-timer-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.025); opacity: 0.82; }
}

@keyframes edrp-dialog-in {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes edrp-celebrate {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.035); box-shadow: 0 0 48px color-mix(in srgb, var(--edrp-accent-2) 32%, transparent); }
}

@media (max-width: 980px) {
    .edrp-main-grid,
    .edrp-dashboard {
        flex-direction: column;
    }

    .edrp-side-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-width: 760px) {
    .edrp-app {
        padding: 18px;
        border-radius: 22px;
    }

    .edrp-hero {
        flex-direction: column;
    }

    .edrp-hero-actions {
        display: flex;
        width: 100%;
    }

    .edrp-hero-actions > * {
        flex: 1;
    }

    .edrp-progress-card {
        align-items: flex-start;
    }

    .edrp-side-panel {
        grid-template-columns: 1fr;
    }

    .edrp-task {
        grid-template-columns: 38px 42px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .edrp-task-copy p {
        display: none;
    }
}

@media (max-width: 540px) {
    .edrp-progress-card,
    .edrp-section-heading,
    .edrp-form-row {
        flex-direction: column;
    }

    .edrp-progress-card {
        align-items: center;
        text-align: center;
    }

    .edrp-stat-row {
        text-align: left;
    }

    .edrp-section-heading {
        align-items: stretch;
    }

    .edrp-task {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        min-height: 82px;
    }

    .edrp-task-icon {
        display: none;
    }

    .edrp-task-topline {
        flex-wrap: wrap;
    }

    .edrp-icon-btn,
    .edrp-primary-btn,
    .edrp-secondary-btn {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .edrp-app *,
    .edrp-app *::before,
    .edrp-app *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
