:root {
    --brand-blue: #0071e3;
    --neutral-light-bg: #f5f5f7;
    --card-surface-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --border-neutral: #d2d2d7;
    --alert-red: #ff3b30;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--neutral-light-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.app-container {
    width: 100%;
    max-width: 680px;
    background: var(--card-surface-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.hidden {
    display: none !important;
}

/* Modal Core Components Setup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}
.close-modal-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Studio Layout Header */
.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-neutral);
    padding-bottom: 16px;
    margin-bottom: 24px;
}
.user-greeting {
    font-weight: 600;
    font-size: 14px;
}
.quota-badge {
    background: var(--neutral-light-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.auth-trigger-btn {
    background: none;
    border: 1px solid var(--brand-blue);
    color: var(--brand-blue);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.auth-trigger-btn:hover {
    background: var(--brand-blue);
    color: white;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    text-align: center;
}
.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

/* Filter Dropdown Menu Elements */
.menu-container {
    margin-bottom: 20px;
}
.menu-toggle-btn {
    width: 100%;
    background: var(--neutral-light-bg);
    border: 1px solid var(--border-neutral);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
}
.menu-arrow {
    font-size: 11px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}
.menu-arrow.open {
    transform: rotate(180deg);
}
.prefix-menu-drawer {
    background: #fafafa;
    border: 1px solid var(--border-neutral);
    border-top: none;
    padding: 20px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    margin-top: -4px;
}
.section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Selector Grid */
.prefix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 8px;
}
.letter-pill {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-surface-bg);
    border: 1px solid var(--border-neutral);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}
.letter-pill:hover {
    background: var(--neutral-light-bg);
}
.letter-pill.selected {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
    font-weight: 600;
}

/* Operational Search Bar UI Elements */
.search-box-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}
.search-input {
    width: 100%;
    height: 52px;
    padding: 0 120px 0 16px;
    font-size: 16px;
    background: var(--neutral-light-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
}
.search-input:focus {
    background: #ffffff;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}
.search-button {
    position: absolute;
    right: 8px;
    height: 36px;
    padding: 0 20px;
    background: var(--brand-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Authentication Area Styling */
.auth-title { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 auto; }
.form-input { height: 44px; padding: 0 14px; font-size: 15px; border: 1px solid var(--border-neutral); border-radius: 10px; outline: none; }
.form-input:focus { border-color: var(--brand-blue); }
.primary-btn { height: 44px; background: var(--brand-blue); color: white; border: none; border-radius: 10px; font-size: 15px; font-weight: 500; cursor: pointer; }

/* Paginated Data Grid Architecture */
.results-panel {
    border-top: 1px solid var(--border-neutral);
    padding-top: 24px;
    display: none;
    position: relative;
}
.results-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.results-title { font-size: 17px; font-weight: 600; }
.results-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.results-content-wrapper { display: flex; flex-direction: column; gap: 8px; }
.data-row { background: var(--neutral-light-bg); padding: 12px 16px; border-radius: 10px; font-size: 14px; display: flex; justify-content: space-between; }
.data-id { color: var(--text-secondary); font-family: monospace; }

/* Navigational Button Layouts */
.pagination-buttons { display: flex; align-items: center; gap: 12px; }
.nav-btn { padding: 6px 12px; font-size: 12px; border: 1px solid var(--border-neutral); border-radius: 6px; background: white; cursor: pointer; }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-indicator { font-size: 12px; color: var(--text-secondary); }

/* Premium Upsell Lock Screen Shield Overlays */
.upsell-container {
    position: relative;
    margin-top: -10px;
    padding: 60px 20px 30px 20px;
    text-align: center;
    background: linear-gradient(to top, rgba(255,255,255,1) 70%, rgba(255,255,255,0.7) 100%);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}
.upsell-content h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 8px 0;
}
.upsell-content p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 auto 20px auto;
    line-height: 1.4;
}
.upsell-btn {
    width: auto;
    padding: 0 32px;
}
