/* ===== Dark Theme for InfoSequr ===== */

:root {
    --bg-dark: #090b10;
    --bg-card: #12151e;
    --bg-input: #1a1e2b;
    --bg-elevated: #1f2333;
    --border: #262a3a;
    --border-subtle: #1e2130;
    --text-primary: #e8eaf0;
    --text-secondary: #7c819a;
    --text-muted: #505468;
    --accent: #f59e0b;
    --accent-hover: #e08e06;
    --accent-glow: rgba(245, 158, 11, 0.12);
    --accent-soft: rgba(245, 158, 11, 0.06);
    --btn-primary: #f59e0b;
    --btn-primary-hover: #e08e06;
    --danger: #ef4444;
    --success: #22c55e;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
}

/* Subtle radial gradient background */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 50% 120%, rgba(245, 158, 11, 0.02) 0%, transparent 50%),
        var(--bg-dark);
}

/* ===== Main Content Card ===== */
.content-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 560px;
    margin: 60px auto 40px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.content-header {
    background: var(--accent);
    padding: 14px 24px;
    text-align: center;
}

.header-logo-img {
    max-height: 34px;
    width: auto;
}

.content-body {
    padding: 28px 32px 32px;
    background: var(--bg-card);
}

/* ===== Footer ===== */
.footer {
    padding: 20px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.footer-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-inner svg {
    opacity: 0.4;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

/* ===== Form Labels ===== */
label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}


/* ===== Kendo Input Overrides ===== */
.k-textbox,
.k-textarea,
.k-input,
.k-input-inner,
span.k-textbox,
span.k-textarea {
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.k-textbox:focus,
.k-textarea:focus,
.k-input:focus,
.k-state-focused,
.k-textbox.k-state-focused,
.k-textarea.k-state-focused {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    outline: none;
}

textarea.k-input-inner {
    min-height: 100px;
}

/* ===== Kendo Button Overrides ===== */
.k-button {
    background: var(--btn-primary) !important;
    border: none !important;
    color: #000 !important;
    border-radius: var(--radius-sm) !important;
    padding: 11px 24px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.k-button:hover {
    background: var(--btn-primary-hover) !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.k-button:active {
    transform: scale(0.98);
}

.k-button.k-state-disabled,
.k-button[disabled] {
    background: var(--bg-elevated) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

#generate-button,
#email-button {
    width: 100%;
}

/* ===== Generate Page ===== */
.generate-intro {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 28px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.generate-intro svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
}

.generate-intro p {
    margin: 0;
}

.generate-field {
    margin-bottom: 20px;
}

.generate-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.generate-char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 6px;
}

/* -- Kendo Editor overrides -- */
.k-editor {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
}

.k-editor .k-editor-toolbar-wrap,
.k-editor .k-toolbar,
.k-editor .k-editor-toolbar {
    background: var(--bg-elevated) !important;
    border-color: var(--border) !important;
    padding: 4px 6px !important;
}

.k-editor .k-tool,
.k-editor .k-button-group .k-tool {
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    border-radius: 6px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
}

.k-editor .k-tool:hover {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
}

.k-editor .k-tool.k-state-selected,
.k-editor .k-tool.k-state-active {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
}

.k-editor .k-tool .k-icon {
    color: inherit !important;
}

.k-editor .k-separator {
    background: var(--border) !important;
    margin: 0 4px !important;
}

.k-editor .k-editable-area {
    border-color: var(--border) !important;
}

.k-editor iframe {
    background: var(--bg-input) !important;
}

/* -- Password option (Generate page) -- */
.password-option {
    margin-bottom: 20px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}

.toggle-row:hover {
    border-color: var(--accent);
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.toggle-label svg {
    color: var(--accent);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: 22px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: #000;
}

/* Password input (shared by Generate + GetNote) */
.password-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.password-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.password-input.empty {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.password-input::placeholder {
    color: var(--text-muted);
}

#password-field {
    margin-top: 10px;
}

/* Password prompt (GetNote page) */
.password-prompt {
    text-align: center;
    margin: 4px 0 28px;
}

.password-prompt .password-input {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

.password-error {
    color: var(--danger);
    font-size: 0.78rem;
    margin: 8px 0 0;
}

/* -- Note content display -- */
.note-content {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    min-height: 80px;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.note-content p {
    margin: 0 0 8px;
}

.note-content ul, .note-content ol {
    padding-left: 20px;
    margin: 0 0 8px;
}

.copy-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 16px;
}

.copy-note-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* -- Link result area -- */
.link-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
    animation: fadeSlideIn 0.4s ease-out;
}

#link-area {
    animation: fadeSlideIn 0.4s ease-out;
}

@keyframes fadeSlideIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.link-box-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.link-box-wrap .k-textbox,
.link-box-wrap span.k-textbox {
    flex: 1;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

#link-box {
    cursor: pointer;
}

/* ===== Error State ===== */
.empty {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ===== Error Messages ===== */
#error-messages {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-secondary);
    padding: 16px 0;
}

/* ===== GetNote Page ===== */

/* -- Pre-reveal state: clean centered CTA -- */
.getnote-pre {
    text-align: center;
    padding: 24px 0 8px;
}

.getnote-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.getnote-pre-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.getnote-pre-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 24px;
}

.getnote-action {
    display: flex;
    justify-content: center;
}

.reveal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 14px 48px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

.reveal-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.reveal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

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

/* -- Post-reveal state: note + minimal meta -- */
.getnote-copy-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 12px;
}

#note-value {
    min-height: 150px;
}

.getnote-meta {
    margin-top: 0;
    padding-top: 0;
}

.meta-details {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
}

.meta-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* -- Status pages (expired / already read / invalid) -- */
.getnote-status {
    text-align: center;
    padding: 48px 24px;
}

.status-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.status-badge.status-read {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--accent);
}

.status-badge.status-expired {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

.status-badge.status-invalid {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

.status-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.status-detail {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 4px 0;
}

.status-detail strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Kendo Grid Overrides ===== */
.k-grid {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

.k-grid th,
.k-grid .k-grid-header {
    background: var(--bg-input) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
    font-weight: 600;
}

.k-grid td {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

.k-grid tr:hover td {
    background: var(--bg-input) !important;
}

.k-grid .k-pager-wrap {
    background: var(--bg-input) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}

/* ===== Kendo ProgressBar ===== */
.k-progressbar {
    width: 100%;
    height: 6px !important;
    margin-bottom: 10px;
    border-radius: 3px !important;
    overflow: hidden;
    background: var(--bg-input) !important;
    border: none !important;
    box-shadow: none !important;
}

.k-progressbar .k-state-selected,
.k-progressbar .k-selected {
    background: linear-gradient(90deg, var(--accent), var(--accent-hover)) !important;
    border-radius: 3px !important;
    border: none !important;
}

.k-progressbar .k-progress-status-wrap,
.k-progressbar .k-progress-status {
    display: none !important;
}

.k-progressbar-chunk,
.k-progressbar .k-item {
    border: none !important;
}

/* ===== Kendo Dialog ===== */
.k-dialog .k-window-titlebar .k-dialog-title {
    visibility: hidden;
}

/* ===== Kendo Notification ===== */
.k-notification {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .content-wrapper {
        width: 95%;
        max-width: 100%;
        margin: 24px auto;
    }

    .content-body {
        padding: 20px;
    }

    .meta-details {
        flex-direction: column;
        align-items: center;
    }

    .generate-intro {
        font-size: 0.78rem;
    }

    .link-box-wrap {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
        height: 38px;
    }

    .getnote-action .k-button {
        font-size: 0.85rem;
        padding: 12px 24px;
    }

    .status-badge {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        width: 100%;
        border-radius: 0;
        margin: 0;
        border-left: none;
        border-right: none;
    }

    .content-header {
        padding: 12px 16px;
    }

    .header-logo-img {
        max-height: 28px;
    }

    .content-body {
        padding: 16px;
    }

    .generate-intro {
        padding: 12px;
    }

    .generate-label {
        font-size: 0.7rem;
    }

    #generate-box {
        min-height: 100px;
    }

    .k-button {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .getnote-pre-title {
        font-size: 0.95rem;
    }

    .getnote-pre-sub {
        font-size: 0.75rem;
    }

    .footer {
        padding: 16px;
        font-size: 0.7rem;
    }

    .status-detail {
        font-size: 0.78rem;
    }
}
