/* ===== CSS Variables & Design Tokens ===== */
:root {
    /* Primary - Orange/Amber (New Primary) */
    --primary-300: #FCD34D;
    --primary-400: #FBBF24;
    --primary-500: #F59E0B;
    --primary-600: #D97706;
    --primary-700: #B45309;

    /* Secondary - Teal/Sea Green (New Secondary) */
    --secondary-300: #5eead4;
    --secondary-400: #2dd4bf;
    --secondary-500: #14b8a6;
    --secondary-600: #0d9488;
    --secondary-700: #0f766e;

    --accent-400: #a78bfa;
    --accent-500: #8b5cf6;
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.15);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--neutral-800);
    background: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}



a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
}

input,
textarea {
    font-family: inherit;
    border: none;
    outline: none;
}

.error-message {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
    text-align: center;
}

.success-message {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid #bbf7d0;
    text-align: center;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 100;
    padding: 1rem 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(229, 229, 229, 0.5);
    border-radius: 12px 12px 0 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
    border-radius: var(--radius-lg);
    color: white;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: var(--shadow-md);
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.logo-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Use this class instead of .logo-icon for custom logos without black background.
   Renders a teal pill frame matching the homepage .brand-logo-frame style. */
.logo-icon-plain {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #0f766e;
    padding: 4px;
    box-sizing: border-box;
    border-radius: 10px;
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.logo-icon-plain img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo:hover .logo-icon-plain {
    transform: scale(1.05);
}

.logo:hover .logo-icon {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: var(--shadow-lg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--neutral-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--neutral-900);
    background: var(--neutral-100);
}

.nav-link.active {
    color: inherit;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--neutral-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border-left: 1px solid var(--neutral-200);
    padding-left: 1.5rem;
}

.btn-signin svg {
    width: 18px;
    height: 18px;
}

.btn-signin:hover {
    color: var(--primary-600);
}

/* ===== Main Content ===== */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 20px;
    position: relative;
    z-index: 2;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    width: 100%;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--neutral-900);
    margin-bottom: 2.5rem;
    letter-spacing: -0.03em;
    animation: fadeIn 0.8s ease-out;
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary-400) 0%, var(--secondary-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dx-brand {
    background: linear-gradient(135deg, var(--secondary-400) 0%, var(--secondary-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

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

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

/* ===== Search ===== */
.search-container {
    max-width: 640px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.search-box {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.search-box:focus-within {
    border-color: var(--primary-500);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-2px);
}

/* Input Area - top section with textarea */
.search-box .input-area {
    flex: 1;
}

/* Wrapper for search input when showing enter-key hint icon */
.search-box .search-input-wrapper {
    position: relative;
    width: 100%;
}
.search-box .search-input-wrapper .search-input {
    padding-right: 2.5rem;
}
.search-box .enter-key-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.4;
}
.search-box .enter-key-hint svg {
    display: block;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--neutral-900);
    background: transparent;
    min-height: 48px;
    max-height: 150px;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) transparent;
    border: none;
}

.search-input::-webkit-scrollbar {
    width: 4px;
}

.search-input::-webkit-scrollbar-track {
    background: transparent;
}

.search-input::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 2px;
}

.search-input::placeholder {
    color: var(--neutral-400);
    transition: opacity 0.3s ease;
}

.search-input.typing::placeholder {
    opacity: 0;
}

/* Action Bar - bottom strip with button */
.search-box .action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: white;
}

/* Search lens icon: visible only when input has non-whitespace (toggle .has-search-text on .search-box via JS) */
.search-box .search-btn.search-lens {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.search-box:not(.has-search-text) .search-btn.search-lens {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--neutral-900);
    color: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.search-btn svg {
    width: 16px;
    height: 16px;
}

.search-btn:hover {
    background: var(--neutral-800);
    opacity: 0.95;
    box-shadow: var(--shadow-sm);
}

.search-btn:active {
    opacity: 0.85;
}

/* Search Tooltip */
.search-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--neutral-800);
    color: white;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all var(--transition-fast);
    pointer-events: none;
}

.search-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border: 5px solid transparent;
    border-top-color: var(--neutral-800);
}

.search-btn:hover .search-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.5) 0%, rgba(240, 253, 250, 0.9) 100%);
    border-top: 1px solid rgba(245, 158, 11, 0.1);
    padding: 1.25rem 0;
    position: relative;
    z-index: 2;
    margin: 0 8px 8px 8px;
    border-radius: 0 0 12px 12px;
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.footer-brand {
    font-weight: 700;
    color: var(--neutral-900);
}

.footer-copyright {
    color: var(--neutral-500);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-right a {
    font-size: 0.875rem;
    color: var(--primary-600);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.footer-right a:hover {
    color: var(--primary-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== Contact Page ===== */
.contact-main {
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: flex-start;
}

.contact-header {
    text-align: center;
    margin-bottom: 0.25rem;
    animation: fadeIn 0.8s ease-out;
}

.contact-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

.contact-subtitle {
    font-size: 0.95rem;
    color: var(--neutral-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

/* Contact Form Card */
.contact-form-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-100);
    transition: all var(--transition-fast);
}

.contact-form-card:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-lg);
}

.form-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

/* Dashboard (legacy-style) profile cards */
.profile-card .form-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.profile-card .form-title .profile-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-500);
}
.profile-card .form-title .profile-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}
.profile-card .profile-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
    font-size: 0.95rem;
}
.profile-card .profile-row .profile-label { color: var(--neutral-500); }
.profile-card .profile-row .profile-value { color: var(--neutral-900); font-weight: 500; }
.profile-links { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--primary-600);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
}
.profile-link:hover { color: var(--primary-700); text-decoration: underline; }
.profile-link .profile-link-icon { display: inline-flex; }
.profile-link .profile-link-icon svg { width: 1rem; height: 1rem; }
.profile-link-muted { color: var(--neutral-500); }
.profile-link-muted:hover { color: var(--neutral-700); }
.delete-confirm-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--neutral-200); }
.delete-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dc2626;
    border-radius: var(--radius-md);
    background: #fef2f2;
}
.delete-warning-box .delete-warning-icon { flex-shrink: 0; color: #dc2626; }
.delete-warning-box .delete-warning-icon svg { width: 1.25rem; height: 1.25rem; }
.delete-warning-box .delete-warning-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #dc2626;
}
.delete-warning-box .delete-warning-text strong { font-weight: 700; color: #dc2626; }
.delete-confirm-label { font-size: 0.85rem; color: var(--neutral-600); margin-bottom: 0.5rem; display: block; }
.delete-confirm-label .delete-label-highlight { color: #dc2626; font-weight: 700; }
.delete-confirm-input {
    width: 100%;
    max-width: 280px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #dc2626;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}
.delete-confirm-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2); }
.delete-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-delete-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    background: var(--neutral-400);
    border-radius: var(--radius-md);
    cursor: not-allowed;
    border: none;
}
.btn-delete-primary:hover:not(:disabled) { background: #b91c1c; }
.btn-delete-primary--enabled,
.btn-delete-primary:not(:disabled) {
    background: #dc2626;
    cursor: pointer;
}
.btn-delete-primary--enabled:hover,
.btn-delete-primary:not(:disabled):hover {
    background: #b91c1c;
}
.btn-cancel {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: transparent;
    color: var(--neutral-600);
    cursor: pointer;
    border: none;
    text-decoration: underline;
}
.btn-cancel:hover { color: var(--neutral-800); }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Floating Label Styles */
.form-group input:not(:placeholder-shown):invalid,
.form-group textarea:not(:placeholder-shown):invalid {
    border-color: #ef4444;
}

.form-group input:not(:placeholder-shown):invalid:focus,
.form-group textarea:not(:placeholder-shown):invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.floating {
    position: relative;
    margin-top: 0.35rem;
}

.form-group.floating label {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--neutral-400);
    pointer-events: none;
    transition: all var(--transition-fast);
    background: transparent;
    padding: 0 0.25rem;
    padding: 0 0.25rem;
    text-transform: none !important;
    /* Force Title Case (override any inherited uppercase) */
}

.form-group.floating textarea~label {
    top: 0.6rem;
    transform: translateY(0);
}

.form-group.floating input:focus~label,
.form-group.floating input:not(:placeholder-shown)~label,
.form-group.floating input:-webkit-autofill~label,
.form-group.floating textarea:focus~label,
.form-group.floating textarea:not(:placeholder-shown)~label,
.form-group.floating textarea:-webkit-autofill~label,
.form-group.floating select:focus~label,
.form-group.floating select:-webkit-autofill~label,
.form-group.floating.has-value label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    /* Adjusted for better visibility */
    font-weight: 500;
    color: var(--primary-600);
    background: white;
    letter-spacing: 0.02em;
    padding: 0 0.25rem;
    text-transform: none !important;
    /* Force Title Case */
}

/* Autofill detection animation - triggers JS event */
@keyframes onAutoFillStart {
    from {
        opacity: 1;
    }

    to {
        opacity: 1;
    }
}

/* Fix for autofill background color + trigger animation */
.form-group.floating input:-webkit-autofill,
.form-group.floating input:-webkit-autofill:hover,
.form-group.floating input:-webkit-autofill:focus,
.form-group.floating select:-webkit-autofill,
.form-group.floating select:-webkit-autofill:hover,
.form-group.floating select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: var(--neutral-900) !important;
    transition: background-color 5000s ease-in-out 0s;
    animation-name: onAutoFillStart;
    animation-duration: 0.001s;
}

.form-group input,
.form-group textarea {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--neutral-900);
    background: white !important;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-height: 3rem;
    /* Adjusted height for balance */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    background: white !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

.form-group textarea {
    resize: none;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
    transition: height var(--transition-base), all var(--transition-fast);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: white !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23404040'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

/* Message wrapper with action bar */
.message-wrapper {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.message-wrapper:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.message-wrapper .input-area {
    position: relative;
    flex: 1;
    padding-top: 0.5rem;
}

.message-wrapper textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 0;
}

.message-wrapper textarea:focus {
    border-color: transparent;
    box-shadow: none;
}

.message-wrapper .input-area label {
    left: 0.75rem;
    top: 0.6rem;
}

.message-wrapper .input-area textarea:focus~label,
.message-wrapper .input-area textarea:not(:placeholder-shown)~label {
    top: 0;
    background: white;
}

/* Action Bar for message */
/* Action Bar for message */
.message-wrapper .action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: white;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Action Gutter Grid */
.action-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    /* Reduced gap */
    row-gap: 4px !important;
    /* Reduced row gap */
    width: auto !important;
    min-width: 90px;
}

/* Ensure data-card handles the gutter correctly if not already flex */
.data-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    /* Reduced gap */
    padding: 12px;
    /* Reduced padding */
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    margin-bottom: 12px;
    /* Reduced margin */
    transition: all 0.2s ease;
}

.data-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.action-gutter {
    flex-shrink: 0;
    border-right: 1px solid var(--neutral-100);
    margin-right: 12px;
    background: var(--neutral-50);
    border-radius: 8px 0 0 8px;
    padding: 8px;
    /* Reduced padding */
    height: 100%;
    min-height: 60px;
    /* Reduced min-height */
}

/* History/Bookmark page: gutter vertical (bookmark above, 3-dot below), narrow like search */
.data-card .action-gutter {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 36px !important;
    min-width: 36px !important;
    margin-right: 0.1rem;
    padding: 0.25rem 0 0.5rem 0;
    gap: 0.15rem;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    min-height: 0;
}

/* Base Action Icon Style */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--neutral-400);
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0;
    /* Hidden by default */
}

.data-card:hover .action-icon {
    opacity: 1;
    /* Visible on card hover */
}

/* Exception: Tag icon might need to be visible if tagged? No, user said "like other icons" */

.action-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Hover Styles - Matching user request with partial transparency (rgba) */

/* Download (Green) */
.action-excel:hover {
    color: #059669;
    /* emerald-600 */
    background-color: rgba(16, 185, 129, 0.15);
    /* emerald-500 @ 15% */
}

/* Copy (Blue) */
.action-copy:hover {
    color: #2563eb;
    /* blue-600 */
    background-color: rgba(59, 130, 246, 0.15);
    /* blue-500 @ 15% */
}

/* Bookmark (Orange/Amber) */
.action-bookmark-add:hover,
.action-bookmark-remove:hover {
    color: #d97706;
    /* amber-600 */
    background-color: rgba(245, 158, 11, 0.15);
    /* amber-500 @ 15% */
}

/* Delete (Red) */
.action-delete:hover {
    color: #dc2626;
    /* red-600 */
    background-color: rgba(239, 68, 68, 0.15);
    /* red-500 @ 15% */
}

/* Info (Gray/Blue) */
.action-info:hover {
    color: #4b5563;
    /* gray-600 */
    background-color: rgba(107, 114, 128, 0.15);
    /* gray-500 @ 15% */
}

/* Tag (Purple) */
.action-tag:hover {
    color: #7c3aed;
    /* violet-600 */
    background-color: rgba(139, 92, 246, 0.15);
    /* violet-500 @ 15% */
}

/* Action Inputs & Buttons */
.action-input-container {
    display: flex;
    align-items: center;
}

/* Inline Send Button */
.submit-btn-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.submit-btn-inline svg {
    width: 14px;
    height: 14px;
    color: white;
    stroke: white;
}

.submit-btn-inline:hover {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
    opacity: 0.9;
    box-shadow: var(--shadow-sm);
}

.submit-btn-inline:active {
    opacity: 0.85;
}

/* ===== Profile Dropdown (Fixed) ===== */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 6px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
    text-align: left;
    /* Ensure text alignment */
}

.user-profile.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 10px 12px;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--neutral-900);
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-email {
    display: block;
    font-size: 0.75rem;
    color: var(--neutral-500);
    margin-top: 2px;
}

.dropdown-divider {
    height: 1px;
    background: var(--neutral-100);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    flex-direction: row;
    /* Explicitly horizontal */
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--neutral-700);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    /* Prevent wrapping */
}

.dropdown-item svg {
    /* Force size constraints */
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
    color: var(--neutral-400);
    transition: color 0.15s ease;
    display: block;
    /* Remove inline spacing */
}

.dropdown-item:hover {
    background: var(--neutral-50);
    color: var(--neutral-900);
}

.dropdown-item:hover svg {
    color: var(--primary-600);
}

.dropdown-item.text-danger:hover {
    background: #FEF2F2;
    color: #DC2626;
}

.dropdown-item.text-danger:hover svg {
    color: #DC2626;
}

/* Tooltip on hover */
.btn-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--neutral-800);
    color: white;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all var(--transition-fast);
    pointer-events: none;
}

.btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border: 5px solid transparent;
    border-top-color: var(--neutral-800);
}

.submit-btn-inline:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-content: start;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-100);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.info-card:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-md);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.info-icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary-600);
}

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

.info-content h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
}

.info-content p {
    font-size: 0.75rem;
    color: var(--neutral-600);
    line-height: 1.4;
}

/* Copyable Items */
.copyable-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.copyable-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.copyable-item span {
    font-size: 0.75rem;
    color: var(--neutral-600);
    line-height: 1.4;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
}

.copyable-item:hover .copy-btn {
    opacity: 1;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
    color: var(--neutral-400);
    transition: all var(--transition-fast);
}

.copy-btn:hover svg {
    color: var(--primary-500);
}

.copy-btn .icon-check {
    display: none;
    color: var(--primary-500);
}

.copy-btn .icon-copy {
    display: block;
}

.copyable-item.copied .copy-btn {
    opacity: 1;
}

.copyable-item.copied .copy-btn .icon-copy {
    display: none;
}

.copyable-item.copied .copy-btn .icon-check {
    display: block;
}

.copyable-item.copied span {
    color: var(--primary-600);
}

.copy-btn {
    position: relative;
}

.copyable-item.copied .copy-btn::after {
    content: 'Copied!';
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.55rem;
    color: white;
    background: var(--primary-500);
    padding: 0.125rem 0.35rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    white-space: nowrap;
    animation: fadeIn 0.2s ease-out;
}

/* Simple Social Row */
.social-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--neutral-400);
    transition: all var(--transition-fast);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    color: var(--primary-500);
    transform: translateY(-2px);
}

.footer-right .active-link {
    color: var(--primary-700);
    font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header {
        top: 4px;
        left: 4px;
        right: 4px;
    }

    .footer {
        margin: 0 4px 4px 4px;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }
.hero {
        padding: 3rem 0;
    }

    .search-box {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--neutral-100);
    }

    .search-btn {
        width: 100%;
        min-height: 48px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 0.25rem;
    }

    body {
        cursor: auto;
    }

    /* Contact page responsive */
    .contact-main {
        padding-top: 100px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        padding: 1.5rem;
    }

    .info-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* ===== Auth Container ===== */
#auth-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* ===== User Profile Component (Styled like Sign In) ===== */
/* ===== User Profile Component (Styled like Sign In) ===== */
.user-profile {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem 0.3rem 0.3rem;
    /* Exact match to btn-signin-modern */
    font-size: 0.75rem;
    /* Exact match to btn-signin-modern */
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--neutral-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    /* border-left: 1px solid var(--neutral-200); Removed border as per user request */
    background: transparent;
    cursor: pointer;
}

.profile-trigger:hover {
    color: var(--primary-600);
}

.profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    /* Make it round like sign-in icon */
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.profile-trigger:hover .profile-avatar {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
    transform: scale(1.1);
    box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.4);
}

.profile-name {
    margin-left: 4px;
}

.profile-chevron {
    width: 14px;
    height: 14px;
    color: var(--neutral-400);
    transition: transform 0.2s ease, color var(--transition-fast);
}

.profile-trigger:hover .profile-chevron {
    color: var(--primary-600);
}

.user-profile.active .profile-chevron {
    transform: rotate(180deg);
    color: var(--primary-600);
}

/* ===== Profile Dropdown (Fixed) ===== */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 6px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
    text-align: left;
}

.user-profile.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 10px 12px;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--neutral-900);
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-email {
    display: block;
    font-size: 0.75rem;
    color: var(--neutral-500);
    margin-top: 2px;
}

.dropdown-divider {
    height: 1px;
    background: var(--neutral-100);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--neutral-700);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dropdown-item svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
    color: var(--neutral-400);
    transition: color 0.15s ease;
    display: block;
}

.dropdown-item:hover {
    background: var(--neutral-50);
    color: var(--neutral-900);
}

.dropdown-item:hover svg {
    color: var(--primary-600);
}

.dropdown-item.text-danger:hover {
    background: #FEF2F2;
    color: #DC2626;
}

.dropdown-item.text-danger:hover svg {
    color: #DC2626;
}

/* Auth Modal Close Button */
.auth-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.auth-close-btn:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

/* Custom Override for Sign In Dropdown Background */
#headerTopUserDropdown {
    background-color: #f0fdfa !important;
}

/* Row with "Filters" + "Clear all" – extra space above filter boxes; font size matches date header (e.g. Today) */
.filter-bar-label-row {
    margin-bottom: 1.5rem !important;
    font-size: 0.85rem !important;
}

/* Clear Filters – secondary link style, primary colour */
.clear-filters-badge {
    background: none;
    color: var(--primary-600);
    padding: 2px 6px;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.clear-filters-badge svg {
    display: block;
    position: relative;
    top: -1px;
}

.clear-filters-badge:hover {
    color: var(--primary-700);
    background-color: var(--neutral-100);
}

/* ===== Policy Pages ===== */
.policy-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

/* ===== Policy Pages ===== */
.policy-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    /* Added top padding */
    animation: fadeIn 0.8s ease-out;
}

.document-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-100);
}

.document-card h2.form-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--neutral-900);
    letter-spacing: -0.02em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.document-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-transform: none;
    letter-spacing: -0.01em;
}

.document-card p,
.document-card li {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--neutral-700);
    margin-bottom: 1.25rem;
}

.document-card ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .document-card {
        padding: 1.5rem;
    }
}

/* Pagination: see /pagination.css (shared legacy style, used on search, history, bookmarks, etc.) */
