/* iPad Form Builder Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Login screen styles moved to modern-theme.css for proper light/dark mode support */

/* App Screens - Transparent backgrounds for modern theme */
#splash-screen,
#settings-screen,
#customer-management-screen,
#form-builder-screen,
#submissions-screen,
#workflows-screen {
    background: transparent !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* CSV Export Styles */
.csv-export-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.csv-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csv-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 5px;
}

.csv-select, .csv-date {
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.csv-select:focus, .csv-date:focus {
    outline: none;
    border-color: #6B5B9A;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

.csv-field-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.csv-toggle-btn {
    padding: 8px 16px;
    border: 2px solid #6B5B9A;
    background: transparent;
    color: #6B5B9A;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.csv-toggle-btn:hover {
    background: #8b7bc4;
    color: white;
}

.csv-fields-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.csv-field-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.csv-field-item:hover {
    background: #f8f9fa;
    border-color: #6B5B9A;
}

.csv-field-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #6B5B9A;
    cursor: pointer;
}

.csv-field-label {
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.csv-date-range {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.csv-date-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.csv-date-input label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.csv-export-btn {
    max-width: 200px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
}

.csv-status {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 10px;
}

.csv-status.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.csv-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c2c7;
}

.csv-status.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.csv-status .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #bee5eb;
    border-radius: 50%;
    border-top-color: #0c5460;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Form Builder Screen Styles - Solid purple matching iOS header */
#form-builder-screen {
    background: #8b7bc4 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Designer PDF Screen Styles - Solid purple matching iOS header */
#designer-pdf-screen {
    background: #8b7bc4 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Submissions Screen Styles - Solid purple matching iOS header */
#submissions-screen {
    background: #8b7bc4 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* CSV Export Screen Styles - Solid purple matching iOS header */
#csv-export-screen {
    background: #8b7bc4 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Login Screen - Styling moved to modern-theme.css */
#login-screen {
    position: relative;
    overflow: hidden;
}

#login-screen.screen {
    background: transparent !important;
}

.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

.login-content {
    max-width: 420px;
    text-align: center;
    width: 100%;
    height: auto;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.login-header {
    flex-shrink: 0;
    margin-bottom: 0;
}

.login-header img {
    height: 64px;
    width: auto;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.login-logo-icon {
    font-size: clamp(2.5rem, 4vw, 4rem);
    filter: grayscale(1) brightness(3) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.15));
    flex-shrink: 0;
    display: inline-block;
    line-height: 1;
}

.login-header p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.4;
    opacity: 1;
}

.login-features {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 2vh, 2rem);
    flex: 1;
    justify-content: center;
    min-height: 0;
}

.login-features-row {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    width: 100%;
    flex-wrap: wrap;
}

.login-features-row.single {
    justify-content: center;
}

.feature {
    padding: clamp(1rem, 2vh, 1.8rem);
    transition: all 0.3s ease;
    min-width: 200px;
    max-width: 280px;
    flex: 1;
    color: white;
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 0.8rem;
}

.feature h3 {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    margin-bottom: 0.4rem;
    color: #333;
    font-weight: 600;
    line-height: 1.2;
}

.feature p {
    color: #666;
    line-height: 1.3;
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
}

.login-actions {
    flex-shrink: 0;
    margin-bottom: 2vh;
}

.primary-login-btn {
    background: linear-gradient(to bottom, #7c5ce0, #6b4ed4);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 12px rgba(124, 92, 224, 0.5);
    margin-top: 0.5rem;
    width: 100%;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .primary-login-btn {
    background: linear-gradient(to bottom, #7c5ce0, #6b4ed4);
}

.primary-login-btn:hover {
    background: linear-gradient(to bottom, #8a6ce8, #7a5ee2);
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(124, 92, 224, 0.6);
}

[data-theme="dark"] .primary-login-btn:hover {
    background: linear-gradient(to bottom, #8a6ce8, #7a5ee2);
}

.primary-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-form {
    width: 100%;
    max-width: 400px;
}

/* Force all auth forms to be hidden by default */
#signin-form,
#signup-form, 
#forgot-form {
    display: none !important;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* Only show the active form */
#signin-form.active,
#signup-form.active,
#forgot-form.active {
    display: flex !important;
}

.auth-form input {
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    background: rgba(199, 191, 223, 0.35);
    backdrop-filter: blur(20px);
    color: white;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .auth-form input {
    background: rgba(60, 50, 80, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-form input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(199, 191, 223, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .auth-form input:focus {
    background: rgba(60, 50, 80, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Name fields row - side by side */
.name-fields-row {
    display: flex;
    gap: 0.75rem;
}

.name-fields-row input {
    flex: 1;
    min-width: 0;
}

/* Social Sign-In Styles */
.social-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    gap: 1rem;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.15);
}

.social-divider span {
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.875rem;
    white-space: nowrap;
}

[data-theme="dark"] .social-divider::before,
[data-theme="dark"] .social-divider::after {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .social-divider span {
    color: rgba(255, 255, 255, 0.5);
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.google-btn {
    background: white;
    color: #3c4043;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.apple-btn {
    background: white;
    color: #3c4043;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.apple-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.social-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

[data-theme="dark"] .google-btn {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .apple-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #3c4043;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-note {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
    opacity: 1;
}

.form-note a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-note a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.auth-message {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    opacity: 1;
}

.login-footer p {
    font-size: 0.875rem;
    margin: 0;
}

.login-footer a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-footer a:hover {
    opacity: 0.8;
}

.privacy-link {
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

.privacy-link a {
    color: #8b7bc4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.privacy-link a:hover {
    color: #6b5aa4;
    text-decoration: underline;
}

/* Splash Screen Edge-to-Edge Design (matching iOS) */
.splash-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.splash-content {
    max-width: 100%;
    width: 100%;
    flex: 1;
    min-height: 0;
    background: white;
    backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Standardized header with consistent minimum height (matching iOS) */
.splash-header {
    min-height: 80px;
    padding: 0.75rem 3rem;
    background: #8b7bc4;
    border-bottom: none;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Make non-main page headers slightly bigger */
#splash-screen .splash-header,
#settings-screen .splash-header,
#form-builder-screen .splash-header,
#customer-management-screen .splash-header,
#submissions-screen .splash-header,
#designer-pdf-screen .splash-header,
#csv-export-screen .splash-header {
    min-height: 115px;
    padding: 1rem 3rem;
}

.user-welcome {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    color: white;
    min-height: 60px;
}

.user-welcome-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1.1;
}

.user-welcome-inline {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    align-items: baseline;
}

.user-welcome .create-form-plus {
    flex-shrink: 0;
}

.welcome-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.user-name {
    color: white !important;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.logout-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: white;
    text-decoration: underline;
}

.create-form-plus {
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.9), rgba(0, 122, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 300;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    margin: 0;
}

.create-form-plus:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* New top-right positioned create button */
.create-form-plus-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    margin: 0;
    z-index: 10;
}

.create-form-plus-top-right:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.splash-main-header {
    text-align: center;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Make splash screen header compact to match other pages */
#splash-screen .splash-header .user-welcome {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    width: auto;
    min-height: auto;
    margin-bottom: 0;
    z-index: 10;
    pointer-events: none;
}

#splash-screen .splash-header .user-welcome .logout-link {
    pointer-events: auto;
}

.splash-header .user-welcome-left {
    gap: 0.2rem;
    line-height: 1.0;
}

.splash-header .welcome-text,
.splash-header .user-name {
    font-size: 0.75rem;
}

.splash-header .logout-link {
    font-size: 0.7rem;
    margin-top: 0.1rem;
}

#splash-screen .splash-header .splash-main-header {
    margin-top: 0;
}

.splash-main-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.25rem;
    color: white;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.splash-logo-icon {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    filter: grayscale(1) brightness(2.5) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    flex-shrink: 0;
    display: inline-block;
}

.splash-main-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    opacity: 1;
    margin: 0;
}

.splash-header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modern-btn {
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.9), rgba(0, 122, 255, 0.8));
    color: white;
    border: none;
    padding: clamp(0.8rem, 1.5vh, 1rem) clamp(1.5rem, 3vw, 2rem);
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: clamp(40px, 5vh, 50px);
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.modern-btn:active {
    transform: translateY(0);
}

.modern-btn.submissions-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.modern-btn.submissions-btn:hover {
    box-shadow: 0 12px 30px rgba(40, 167, 69, 0.4);
}

.btn-icon {
    font-size: 1.2em;
}

.splash-main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center forms container horizontally */
}

.splash-footer {
    padding: 1rem 3rem 2rem 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.footer-tile {
    background: transparent;
    color: #8b7bc4;
    border: none;
    padding: 1rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.footer-tile:hover {
    color: #9a8dd1;
    transform: translateY(-2px);
}

.footer-tile.edit-tile.active {
    color: #28a745;
}

.footer-tile.logout-tile {
    color: #dc3545;
}

.footer-tile.logout-tile:hover {
    color: #c82333;
}

.tile-icon {
    font-size: 1.8rem;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.8rem;
}

.tile-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.footer-tile:hover .tile-icon {
    transform: scale(1.1);
}

/* Special colors for different tiles */
.submissions-tile {
    color: #8b7bc4;
}

.submissions-tile:hover {
    color: #9a8dd1;
}

.edit-tile {
    color: #8b7bc4;
}

.edit-tile:hover {
    color: #9a8dd1;
}

.settings-tile {
    color: #8b7bc4;
}

.settings-tile:hover {
    color: #9a8dd1;
}

.home-tile {
    color: #8b7bc4;
}

.home-tile:hover {
    color: #9a8dd1;
}

/* Customers tile - only purple when active */
.footer-tile.customers-tile.active {
    color: #8b7bc4 !important;
}

.footer-tile.customers-tile.active .tile-icon {
    color: #8b7bc4 !important;
}

.footer-tile.customers-tile.active .tile-text {
    color: #8b7bc4 !important;
}

/* Custom Dialog Styling */
.custom-dialog {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.dialog-message {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.dialog-button {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.confirm-button {
    background: #8b7bc4;
    color: white;
}

.confirm-button:hover {
    background: #9a8dd1;
    transform: translateY(-1px);
}

.cancel-button {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.cancel-button:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

/* Forms List Modern Styling */
.forms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
    align-items: start;
    align-content: start; /* Keep cards at top, prevent vertical spreading */
    max-width: 1200px; /* Limit max width for large monitors */
    width: 100%;
}

.form-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-width: 350px;
    width: 100%;
    position: relative;
}

.form-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

/* Responsive Design for Different Screen Sizes */
@media (max-height: 700px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-content {
        padding: 2rem 3rem;
    }
    
    .login-header {
        margin-bottom: 1.5rem;
    }
    
    .login-features {
        margin-bottom: 1.5rem;
    }
    
    .feature {
        padding: 1rem;
    }
    
    /* Splash screen responsive */
    .splash-container {
        padding: 0;
        height: 100vh;
    }
    
    .splash-content {
        flex: 1;
        min-height: 0;
    }
    
    .splash-header {
        padding: 1.5rem 2rem 1rem 2rem;
    }
    
    .splash-main-content {
        padding: 1.5rem 2rem;
    }
    
    .splash-footer {
        padding: 1rem 2rem 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .login-content {
        padding: 3rem 2rem;
        border-radius: 15px;
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    .login-features-row {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .feature {
        width: 100%;
        max-width: 350px;
        text-align: center;
    }
    
    /* Splash screen mobile */
    .splash-container {
        padding: 0;
        min-height: 100vh;
    }
    
    .splash-content {
        border-radius: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        min-height: 100vh;
    }
    
    .splash-header {
        padding: 2rem 1.5rem 1rem 1.5rem;
    }
    
    .user-welcome {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
        text-align: left;
    }
    
    .user-welcome-left {
        text-align: left;
    }
    
    .welcome-message {
        font-size: 1.2rem;
    }
    
    .create-form-plus {
        font-size: 1.8rem;
        align-self: flex-end;
    }
    
    .splash-main-content {
        padding: 1rem;
    }
    
    .splash-footer {
        padding: 1rem;
    }
    
    .footer-tiles {
        gap: 0.75rem;
    }
    
    .footer-tile {
        padding: 1rem 0.75rem;
        min-height: 3.5rem;
    }
    
    .tile-icon {
        font-size: 1.2rem;
    }
    
    .tile-text {
        font-size: 0.85rem;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .login-content {
        gap: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .login-header p {
        font-size: 1rem;
    }
    
    .login-header img {
        height: 56px;
    }
    
    .splash-content {
        padding: 1rem;
    }
    
    .footer-tiles {
        gap: 0.5rem;
    }
    
    .footer-tile {
        padding: 0.75rem 0.5rem;
        min-height: 3rem;
    }
    
    .tile-icon {
        font-size: 1rem;
    }
    
    .tile-text {
        font-size: 0.75rem;
    }
    
    .splash-main-header h1 {
        font-size: 2rem;
    }
}


/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: 1rem;
    }
    
    .login-content {
        gap: 1rem;
    }
    
    .login-header {
        margin-bottom: 0;
    }
    
    .login-header img {
        height: 48px;
        margin-bottom: 8px;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
    
    .login-header p {
        font-size: 0.9375rem;
    }
    
    .login-footer {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    height: 100vh;
    overflow: hidden;
}

/* Keep gradient background on main screens instead of white */
body.app-loaded #splash-screen,
body.app-loaded #settings-screen,
body.app-loaded #form-builder-screen,
body.app-loaded #customer-management-screen {
    background: transparent !important;
}

/* Customer Management Table Styles */
.customer-table-container {
    background: var(--glass-bg, rgba(255, 255, 255, 0.95));
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 1rem 0;
    backdrop-filter: blur(8px);
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: transparent;
}

.customer-table thead {
    background: rgba(139, 123, 196, 0.15);
    color: var(--brand-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.customer-table th {
    padding: 1rem 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: none;
}

.customer-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.customer-table tbody tr:hover {
    background: var(--bg-hover);
    transform: scale(1.001);
}

.customer-table tbody tr:nth-child(even) {
    background: rgba(139, 123, 196, 0.03);
}

.customer-table tbody tr:nth-child(even):hover {
    background: var(--bg-hover);
}

.customer-table td {
    padding: 0.8rem 1.2rem;
    vertical-align: top;
    border: none;
    line-height: 1.4;
}

.customer-name-cell strong {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
}

.customer-address-cell {
    color: var(--text-main);
    max-width: 200px;
}

.customer-address-cell small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.customer-contact-cell {
    color: var(--text-main);
    font-size: 0.9rem;
}

.customer-marker-cell {
    color: var(--text-secondary);
    font-style: italic;
    max-width: 150px;
    word-break: break-word;
}

.id-photo-header {
    text-align: center;
    width: 120px;
}

.customer-id-photo-cell {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.customer-id-photo-cell small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-top: 2px;
}

.customer-actions-cell {
    text-align: right;
    white-space: nowrap;
}

.action-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-link:hover {
    background: var(--bg-hover);
    text-decoration: none;
    transform: scale(1.05);
}

.action-link.delete-link {
    color: #dc3545;
}

.action-link.delete-link:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #ff4d5e;
}

.action-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
    font-weight: 300;
}

.no-customers-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-style: italic;
}

/* Responsive Design for Customer Table */
@media (max-width: 768px) {
    .customer-table-container {
        margin: 0.5rem 0;
        border-radius: 10px;
    }
    
    .customer-table {
        font-size: 0.9rem;
    }
    
    .customer-table th,
    .customer-table td {
        padding: 0.6rem 0.8rem;
    }
    
    .customer-table th {
        font-size: 0.85rem;
    }
    
    .customer-name-cell strong {
        font-size: 0.95rem;
    }
    
    .customer-address-cell {
        max-width: 150px;
    }
    
    .customer-marker-cell {
        max-width: 120px;
    }
    
    .action-link {
        font-size: 0.85rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Main Forms Page - Keep scrolling enabled */
#splash-screen .splash-main-content {
    overflow-y: auto !important;
}

/* Customer Page Sidebar Layout */
#customer-management-screen .splash-main-content {
    display: flex !important;
    flex-direction: row !important;
    padding: 0 !important;
    overflow: visible !important;
    flex: 1 !important;
    min-height: 0 !important;
    align-items: stretch !important;
}

/* Form Builder Page - Edge-to-edge layout */
#form-builder-screen .splash-main-content {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
    flex: 1 !important;
    min-height: 0 !important;
}

/* Designer PDF Screen - Edge-to-edge layout */
#designer-pdf-screen .splash-main-content {
    padding: 0 !important;
}

/* Settings Screen - Edge-to-edge layout matching customer page */
#settings-screen .splash-main-content {
    padding: 0 !important;
}

.settings-container {
    display: flex;
    flex-direction: row;
    gap: 0;
    width: 100%;
    align-self: stretch;
    flex: 1;
    padding: 0;
}

.settings-nav {
    width: 320px;
    background: #f8f9fa;
    border-right: 1px solid #e1e4e8;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 20px 12px;
}

.settings-nav-btn {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 6px;
    border: none;
    background: transparent;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.settings-nav-btn:hover {
    background: #e9ecef;
}

.settings-nav-btn.active {
    background: #8b7bc4;
    color: white;
}

.settings-nav-btn .nav-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: transparent;
    min-height: 0;
}

.customer-page-layout {
    display: flex;
    flex-direction: row;
    gap: 0;
    width: 100%;
    align-self: stretch;
    flex: 1;
    padding: 0;
}

.customer-sidebar {
    width: 320px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

.sidebar-action-btn {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.sidebar-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 123, 196, 0.15);
}

.sidebar-action-btn:active {
    transform: translateY(0);
}

.sidebar-action-btn .btn-icon {
    font-size: 18px;
    font-weight: bold;
}

.primary-sidebar-btn {
    background: #8b7bc4;
    color: white;
    border-color: #8b7bc4;
}

.primary-sidebar-btn:hover {
    background: #7a6bb3;
    border-color: #7a6bb3;
}

.sidebar-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-input);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

.sidebar-search-btn {
    width: 100%;
    padding: 10px;
    background: #8b7bc4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-search-btn:hover {
    background: #7a6bb3;
}

.sidebar-stat {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-primary);
}

.customer-main-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--bg-main);
    min-height: 0;
}

/* Customer Edit Sidebar (Right) */
.customer-edit-sidebar {
    width: 380px;
    background: linear-gradient(135deg, #faf9fc 0%, #ffffff 100%);
    border-left: 2px solid #dee2e6;
    display: none;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    margin-top: 30px;
    height: calc(100vh - 30px);
}

.customer-edit-sidebar.active {
    display: flex;
    transform: translateX(0);
}

.customer-edit-sidebar .sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e8ebf7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #8b7bc4;
}

.customer-edit-sidebar .sidebar-header h3 {
    color: white;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.customer-edit-sidebar .close-sidebar-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-edit-sidebar .close-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.customer-edit-sidebar .sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.customer-edit-sidebar .sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 2px solid #e8ebf7;
    display: flex;
    gap: 10px;
    background: #fafafa;
}

.customer-edit-sidebar .sidebar-footer button {
    flex: 1;
}

.customer-form-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-form-field {
    display: flex;
    flex-direction: column;
}

.customer-form-field label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c3e50;
    font-size: 0.95rem;
}

.customer-edit-sidebar .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.customer-edit-sidebar .form-input:focus {
    outline: none;
    border-color: #8b7bc4;
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

.customer-edit-sidebar textarea.form-input {
    resize: vertical;
    font-family: inherit;
}

.customer-edit-sidebar input[type="checkbox"] {
    accent-color: #8b7bc4;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
    .customer-sidebar {
        width: 280px;
    }
    
    .customer-edit-sidebar {
        width: 100%;
        max-width: 380px;
    }
}

@media (max-width: 768px) {
    .customer-page-layout {
        flex-direction: column;
    }
    
    .customer-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e1e4e8;
        max-height: 50vh;
    }
    
    .customer-main-area {
        padding: 16px;
    }
}

@media (max-width: 600px) {
    /* Stack table on very small screens */
    .customer-table-container {
        overflow-x: auto;
    }
    
    .customer-table {
        min-width: 600px;
    }
}

/* Alternative mobile card layout (if table becomes too cramped) */
@media (max-width: 480px) {
    .customer-table-container {
        background: transparent;
        box-shadow: none;
    }
    
    .customer-table thead {
        display: none;
    }
    
    .customer-table tbody,
    .customer-table tr,
    .customer-table td {
        display: block;
        width: 100%;
    }
    
    .customer-table tbody tr {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-bottom: none;
    }
    
    .customer-table tbody tr:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .customer-table td {
        padding: 0.4rem 0;
        border: none;
        position: relative;
        padding-left: 35%;
    }
    
    .customer-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 0;
        width: 30%;
        font-weight: 600;
        color: #6B5B9A;
        text-align: left;
    }
    
    .customer-actions-cell {
        text-align: left;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
    }
}

#app {
    height: 100vh;
    position: relative;
}

.screen {
    display: none;
    height: 100vh;
    background: white;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.header {
    background: #8b7bc4;
    padding: 20px 20px;
    border-bottom: none;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-text {
    flex-grow: 1;
    text-align: center;
}

.header-left-buttons {
    display: flex;
    gap: 10px;
}

.header-create-btn, .header-edit-btn, .header-settings-btn {
    background: #8b7bc4;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.header-create-btn:hover, .header-edit-btn:hover, .header-settings-btn:hover {
    background: #9a8dd1;
    transform: translateY(-1px);
}

.header-edit-btn, .header-settings-btn {
    background: #6c757d;
}

.header-edit-btn:hover, .header-settings-btn:hover {
    background: #545b62;
}

.header-edit-btn.active {
    background: #28a745;
}

.header-edit-btn.active:hover {
    background: #218838;
}

.plus-icon, .edit-icon, .settings-icon {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "liga" off;
    font-feature-settings: "liga" off;
}

.btn-text {
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.1;
}

.header h1, .header h2 {
    color: white;
    text-align: center;
    flex-grow: 1;
    margin: 0;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header h2 {
    font-size: 2rem;
    margin: 0;
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.primary-button {
    background: #E8D9F5;
    color: #6b46a8;
    border: 1px solid #D4C5E8;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-button:hover {
    background: #D4C5E8;
    border-color: #C0B0DC;
    transform: translateY(-1px);
}

.secondary-button {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.secondary-button:hover {
    background: #dee2e6;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.forms-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}


.form-card-content {
    padding: 12px 16px;
    cursor: pointer;
}

.form-card-actions {
    display: none;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-top: 1px solid #e9ecef;
    background: white;
}

.form-card-actions.visible {
    display: flex;
}

.form-card-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: none;
    height: auto;
    min-height: 36px;
}

.form-card-actions .edit-btn {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-card-actions .edit-btn:hover {
    background: #c3e6cb;
    border-color: #b1dfbb;
    transform: translateY(-1px);
}

.form-card-actions .designer-btn {
    background: #E8D9F5;
    color: #6b46a8;
    border: 1px solid #D4C5E8;
}

.form-card-actions .designer-btn:hover {
    background: #D4C5E8;
    border-color: #C0B0DC;
    transform: translateY(-1px);
}

.form-card-actions .delete-btn {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-card-actions .delete-btn:hover {
    background: #f5c6cb;
    border-color: #f1b0b7;
    transform: translateY(-1px);
}

/* Settings button styling - positioned above the button line */
.form-settings-btn {
    position: absolute;
    bottom: 85px;
    right: 8px;
    background: transparent;
    color: #5B4B8A;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 22px;
    font-weight: normal;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.form-settings-btn.visible {
    display: flex;
}

.form-settings-btn:hover {
    color: #6B5B9A;
    transform: translateY(-2px) scale(1.1);
}

.form-card:hover {
    border-color: #6B5B9A;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(111,66,193,0.2);
}

.form-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.form-card .form-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.form-card-info {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-created-date {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.ios-fill-indicator {
    font-size: 0.85rem;
    color: #6B5B9A;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Designer PDF Text Indicator */
.designer-text-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #5B4B8A;
    background: rgba(139, 123, 196, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

@keyframes designerPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Form Builder Sidebar Layout */
.form-builder-layout {
    display: flex;
    gap: 0;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative; /* For absolute positioning of field-edit-sidebar */
}

.form-builder-sidebar {
    flex: 0 0 260px;
    background: var(--bg-card, linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%));
    border-right: 2px solid var(--border-color, #dee2e6);
    padding: 0;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.form-builder-sidebar h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin: 0;
    padding: 1.5rem 1rem 1rem 1rem;
    border-bottom: 2px solid #6B5B9A;
    flex-shrink: 0;
}

.form-builder-main {
    flex: 1;
    padding: 2rem 2rem;
    overflow: hidden;
    background: var(--bg-main, #ffffff);
    min-width: 400px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Form Builder Page Navigation */
.form-builder-page-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: var(--bg-card, linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%));
    border: 1px solid var(--border-color, #dee2e6);
    flex-shrink: 0;
}

.empty-page-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

.empty-page-placeholder p {
    margin: 10px 0 0 0;
    font-size: 0.95rem;
}

.empty-page-placeholder strong {
    display: block;
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 8px;
}

/* Field Edit Sidebar (Right) */
/* Page Settings Sidebar (always visible) */
.page-settings-sidebar {
    width: 300px;
    background: var(--bg-card, linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%));
    border-left: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    max-height: 100%;
}

.page-settings-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #e8ebf7;
    background: linear-gradient(135deg, #E8D9F5 0%, #D4C5E8 100%);
    flex-shrink: 0;
}

.page-settings-header h3 {
    color: #6b46a8;
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.page-settings-content {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.page-setting-section {
    margin-bottom: 20px;
}

.page-setting-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.page-setting-section h4 {
    color: #6b46a8;
    font-size: 0.95rem;
    margin: 0 0 8px 0;
}

/* Field Edit Sidebar (overlays page settings when active) */
.field-edit-sidebar {
    width: 380px;
    background: linear-gradient(135deg, #faf9fc 0%, #ffffff 100%);
    border-left: 2px solid #dee2e6;
    display: none;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
    overflow: hidden;
}

.field-edit-sidebar.active {
    display: flex;
}

.field-edit-sidebar .sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e8ebf7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #E8D9F5 0%, #D4C5E8 100%);
    flex-shrink: 0;
}

.field-edit-sidebar .sidebar-header h3 {
    color: #6b46a8;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.field-edit-sidebar .close-sidebar-btn {
    background: rgba(107, 70, 168, 0.1);
    border: 1px solid rgba(107, 70, 168, 0.2);
    color: #6b46a8;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-edit-sidebar .close-sidebar-btn:hover {
    background: rgba(107, 70, 168, 0.2);
    border-color: rgba(107, 70, 168, 0.3);
}

.field-edit-sidebar .sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 0;
}

.field-edit-sidebar .sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 2px solid #e8ebf7;
    display: flex;
    gap: 10px;
    background: #fafafa;
    flex-shrink: 0;
}

.field-edit-sidebar .sidebar-footer button {
    flex: 1;
}

.field-sidebar-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f0f4ff;
    border-radius: 6px;
}

/* Calculation field checkboxes - display vertically */
.calculation-field-option {
    display: block;
    padding: 8px 0;
    cursor: pointer;
    font-size: 0.95rem;
}

.calculation-field-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Purple checkboxes throughout sidebar */
.field-edit-sidebar input[type="checkbox"] {
    accent-color: #6b46a8;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Vertically center checkbox labels */
.field-edit-sidebar label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Legacy support */
.form-builder-content {
    padding: 2rem 3rem;
    overflow-y: auto;
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

/* Form name input in form builder should not scroll away */
.form-builder-main > #form-name-input {
    flex-shrink: 0;
}

/* Compact version for sidebar select boxes */
.designer-sidebar .form-input,
.designer-left-sidebar .form-input,
.designer-right-sidebar .form-input {
    padding: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Field Properties Sidebar Panel */
.field-properties-sidebar {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.field-properties-sidebar .properties-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-properties-sidebar label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.field-properties-sidebar .form-group {
    margin: 3px 0;
}

.field-properties-sidebar .form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    font-size: 0.85rem;
}

.field-properties-sidebar .form-input {
    padding: 4px 6px;
    font-size: 0.85rem;
}

/* Alignment Buttons */
.alignment-btn {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alignment-btn svg {
    display: block;
}

.alignment-btn.active {
    background: #5B4B8A;
    color: white;
    border-color: #5B4B8A;
}

.alignment-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* Page Options Panel */
.page-options-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Page Size Button Group */
.page-size-button-group {
    display: flex;
    gap: 5px;
}

.page-size-btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-size-btn.active {
    background: #5B4B8A;
    color: white;
    border-color: #5B4B8A;
}

.page-size-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* Orientation Button Group */
.orientation-button-group {
    display: flex;
    gap: 5px;
}

.orientation-btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.orientation-btn.active {
    background: #5B4B8A;
    color: white;
    border-color: #5B4B8A;
}

.orientation-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* Inline Input Group for compact size inputs */
.inline-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.inline-input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

.inline-input {
    flex: 1;
    padding: 4px 6px;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    max-width: 60px;
}

/* Custom Purple Checkboxes for Designer Sidebar */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 4px 0;
    user-select: none;
}

.custom-checkbox input[type="checkbox"] {
    position: relative;
    width: 18px;
    height: 18px;
    margin: 0;
    appearance: none;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"]:hover {
    border-color: #6B5B9A;
    background: #f8f6ff;
}

.custom-checkbox input[type="checkbox"]:checked {
    background: #5B4B8A;
    border-color: #5B4B8A;
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.custom-checkbox .checkmark {
    display: none;
}

/* Compact version for field edit sidebar inputs */
.field-edit-sidebar .form-input,
.field-edit-sidebar input[type="text"],
.field-edit-sidebar input[type="number"],
.field-edit-sidebar select,
.field-edit-sidebar textarea {
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    border-radius: 8px;
}

.form-input:focus {
    outline: none;
    border-color: #6B5B9A;
}

.field-types h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Form Settings Section */
.form-settings-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Field Option Sections for Choice Fields */
.field-option-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #fefeff 100%);
    border: 1px solid #e8ebf7;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 123, 196, 0.08);
}

.field-option-section:hover {
    border-color: #6B5B9A;
    box-shadow: 0 4px 16px rgba(139, 123, 196, 0.12);
}

.field-option-section h4 {
    color: #6B5B9A;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8ebf7;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Specific icons for specific sections */
#field-options-section h4::before {
    content: "📝";
    font-size: 0.9rem;
}

/* Enhanced Options Textarea */
#field-options-textarea {
    background: white;
    border: 2px solid #e8ebf7;
    border-radius: 8px;
    padding: 16px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#field-options-textarea:focus {
    border-color: #6B5B9A;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(139, 123, 196, 0.1);
}

#field-options-textarea::placeholder {
    color: #8b8b8b;
    font-style: italic;
}

/* Enhanced Labels and Checkboxes - Only for simple toggle labels */
.modal-content label.simple-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-content label.simple-toggle:hover {
    color: #2d3748;
}

/* Enhanced checkboxes for all modal content */
.modal-content input[type="checkbox"] {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    appearance: none;
    background: white;
    border: 2px solid #e8ebf7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    vertical-align: top;
    flex-shrink: 0;
    min-width: 20px;
}

.modal-content input[type="checkbox"]:hover {
    border-color: #6B5B9A;
    background: #f8f6ff;
}

.modal-content input[type="checkbox"]:checked {
    background: #8b7bc4;
    border-color: #6B5B9A;
}

.modal-content input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.modal-content input[type="checkbox"]:focus {
    border-color: #6B5B9A;
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

/* Keep regular labels for complex content */
.modal-content label {
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    margin: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

/* Field Title Input Enhancement */
#field-title-input {
    background: white;
    border: 2px solid #e8ebf7;
    border-radius: 10px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#field-title-input:focus {
    border-color: #6B5B9A;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(139, 123, 196, 0.1);
}

#field-title-input::placeholder {
    color: #a0a0a0;
    font-weight: 400;
}

/* Enhanced Modal Header */
.modal-content h3 {
    color: #2d3748;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8ebf7;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Light purple header for Field Properties modal */
#field-properties-modal .modal-content h3 {
    background: linear-gradient(135deg, #E8D9F5 0%, #D4C5E8 100%);
    color: #6b46a8;
    font-weight: 600;
    margin: -24px -24px 20px -24px;
    padding: 1.5rem 1.5rem;
    border-bottom: 2px solid #e8ebf7;
    border-radius: 10px 10px 0 0;
}

/* Remove generic icons for now - let field types be distinguished by text */

/* Conditional Logic Section Enhancement */
#conditional-logic-section h4::before {
    content: "";
}

/* Better spacing for conditional settings */
#conditional-settings {
    background: rgba(139, 123, 196, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

/* Field option sections styling */
.field-option-section {
    background: rgba(139, 123, 196, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
}

.field-option-section h4 {
    margin: 0 0 12px 0;
    color: #6B5B9A;
    font-weight: 600;
}

/* Field modal description */
.field-modal-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Reduce spacing in field config modal */
#field-config-modal .form-input {
    margin-bottom: 8px;
}

#field-config-modal label {
    margin-bottom: 4px !important;
}

/* Close gap between modal title and description */
#field-config-modal h3 {
    margin-bottom: 8px;
}


/* Enhanced modal buttons */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e8ebf7;
}

/* Add Photo Card Styling - inline with photos */
.add-photo-card {
    /* Styling is handled inline in JavaScript for this dynamic element */
}

.form-settings-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.form-setting-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.form-setting-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.setting-label {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.4rem;
}

/* PDF Filename fields - compact grid */
#pdf-naming-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e8ebf7;
}

#pdf-naming-fields .setting-label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.setting-label input[type="checkbox"] {
    position: relative;
    margin: 0;
    width: 20px;
    height: 20px;
    appearance: none;
    background: white;
    border: 2px solid #e8ebf7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    vertical-align: middle;
}

.setting-label input[type="checkbox"]:hover {
    border-color: #6B5B9A;
    background: #f8f6ff;
}

.setting-label input[type="checkbox"]:checked {
    background: #8b7bc4;
    border-color: #6B5B9A;
}

.setting-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.setting-label input[type="checkbox"]:focus {
    border-color: #6B5B9A;
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

.setting-text {
    font-weight: 500;
    user-select: none;
}

.setting-description {
    margin-left: 2.6rem;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* PDF section heading */
.form-setting-item .setting-label > .setting-text {
    font-weight: 600;
    font-size: 1rem;
}

#pdf-naming-preview {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    color: #666;
    border: 1px solid #e0e0e0;
}

/* Field type categories - accordion layout */
.field-type-categories {
    display: block;
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.field-type-categories > * {
    margin-bottom: 8px;
}

.field-type-categories > *:last-child {
    margin-bottom: 0;
}

.field-category {
    border: 1.5px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: var(--bg-surface, white);
    overflow: hidden;
    transition: all 0.2s;
}

.category-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-surface, white);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s;
    color: var(--text-main, #2c3e50);
}

.category-header:hover {
    background: var(--bg-hover, #f8f9fa);
}

.category-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    color: #6B5B9A;
}

.category-title {
    flex-grow: 1;
}

.category-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: #6B5B9A;
}

.field-category.collapsed .category-arrow i {
    transform: rotate(-90deg);
}

.category-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: var(--bg-input, #f8f9fa);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.field-category.collapsed .category-fields {
    max-height: 0;
    padding: 0 8px;
}

/* Sidebar button styling */
.form-builder-sidebar .field-type-btn {
    background: white;
    border: 1.5px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: left;
    width: 100%;
}

.form-builder-sidebar .field-type-btn:hover {
    background: #8b7bc4;
    color: white;
    border-color: #6B5B9A;
    transform: translateX(4px);
}

/* Legacy field type buttons for other contexts */
.field-type-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    max-width: 100%;
}

/* Default button styling */
.field-type-btn {
    background: #e9ecef;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.field-type-btn:hover {
    background: #8b7bc4;
    color: white;
    border-color: #6B5B9A;
}

.form-fields {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}


.field-info h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.field-info .field-details {
    color: #6c757d;
    font-size: 0.9rem;
}

.field-actions button {
    margin-left: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.edit-btn {
    background: #28a745;
    color: white;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.form-content {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
}

/* Form Builder Screen Container Styling - Match Main Page Exactly */
#form-builder-screen.active,
#designer-pdf-screen.active {
    background: transparent !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

#form-builder-screen.active .splash-container,
#designer-pdf-screen.active .splash-container {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    overflow: hidden;
}

#form-builder-screen.active .splash-content,
#designer-pdf-screen.active .splash-content {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    background: white;
    backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Ensure form content areas use full width and enable child scrolling */
#form-builder-screen .splash-main-content,
#designer-pdf-screen .splash-main-content {
    width: 100%;
    max-width: none;
    overflow: hidden;
    padding: 0;
}

#form-builder-screen .form-builder-content {
    width: 100%;
    max-width: none;
}

.form-field {
    margin-bottom: 20px;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
    flex-shrink: 0;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.required::after {
    content: " *";
    color: #dc3545;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #6B5B9A;
}

.choices-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.choice-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.choice-item:hover {
    border-color: #6B5B9A;
}

.choice-item input {
    margin-right: 10px;
    width: auto;
}

/* Compact Drawing and Signature Fields */
.drawing-field-compact, .signature-field-compact {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawing-field-compact:hover, .signature-field-compact:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.drawing-placeholder, .signature-placeholder {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 16px;
}

.drawing-icon, .signature-icon {
    font-size: 20px;
}

.drawing-text, .signature-text {
    user-select: none;
}

.drawing-preview, .signature-preview {
    max-width: 100%;
    max-height: 40px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Drawing and Signature Modals */
.drawing-modal, .signature-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.drawing-modal.show, .signature-modal.show {
    display: flex;
}

.drawing-modal-content, .signature-modal-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.drawing-canvas, .signature-pad {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: crosshair;
    background: white;
    touch-action: none;
}

.drawing-modal-header, .signature-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.drawing-modal-title, .signature-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.drawing-modal-actions, .signature-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.modal-btn-primary {
    background: #8b7bc4;
    color: white;
}

.modal-btn-primary:hover {
    background: #5936a3;
}

.modal-btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.modal-btn-secondary:hover {
    background: #e9ecef;
}

.modal-btn-danger {
    background: #dc3545;
    color: white;
}

.modal-btn-danger:hover {
    background: #c82333;
}

/* Form Settings Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

/* Compact Field Properties Modal */
#field-properties-modal {
    align-items: flex-start;
    justify-content: flex-start;
    background: rgba(0, 0, 0, 0.3);
}

#field-properties-modal .modal-content {
    max-width: 350px;
    width: auto;
    min-width: 300px;
    max-height: 85vh;
    margin: 0;
    position: absolute;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.modal-content {
    background: var(--bg-card, white);
    border-radius: 15px;
    padding: 25px;
    max-width: 750px;
    width: 90%;
    max-height: 85vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0;
    border-bottom: none;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main, #2c3e50);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 1px solid #e8ebf7;
}

.photo-upload {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-upload:hover {
    border-color: #6B5B9A;
    background: #f0f8ff;
}

.photo-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Multiple photos container */
.photos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.photo-wrapper {
    position: relative;
    display: inline-block;
}

.photo-preview-multiple {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
}

.remove-photo-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.remove-photo-btn:hover {
    background: #cc3333;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-content label {
    display: block;
    margin: 15px 0;
    font-weight: 500;
}

.modal-content input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Settings Screen Styles - Extracted to public/settings.css */

/* Designer PDF Screen Styles - 3 Column Layout */
.designer-content {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    height: calc(100vh - 120px);
    overflow: hidden;
    gap: 0;
}

/* Left Sidebar - Fields & Tools */
.designer-left-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 10px;
    overflow-y: auto;
    text-align: left;
}

.designer-left-sidebar h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    margin-top: 0;
    font-size: 0.95rem;
    text-align: left;
    font-weight: 600;
}

/* Right Sidebar - Page Options & Field Properties */
.designer-right-sidebar {
    background: #f8f9fa;
    border-left: 1px solid #dee2e6;
    padding: 10px;
    overflow-y: auto;
    text-align: left;
}

.designer-right-sidebar h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    margin-top: 0;
    font-size: 0.95rem;
    text-align: left;
    font-weight: 600;
}

/* Legacy support for old .designer-sidebar class */
.designer-sidebar {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 10px;
    overflow-y: auto;
    text-align: left;
}

.designer-sidebar h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
    text-align: left;
    font-weight: 600;
}

.available-fields {
    margin-bottom: 30px;
}

.field-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.field-item:active {
    cursor: grabbing;
}

.field-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
}

.field-item.drag-over-top::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    z-index: 10;
}

.field-item.drag-over-bottom::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    z-index: 10;
}

.drag-handle {
    color: #999;
    font-size: 16px;
    cursor: grab;
    user-select: none;
    padding: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

.drag-handle:hover {
    color: #667eea;
}

.field-item:active .drag-handle {
    cursor: grabbing;
}

.field-item:hover {
    border-color: #6B5B9A;
    transform: translateX(4px);
}

.field-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.field-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Static text expand/collapse button */
.static-text-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.expand-text-btn {
    align-self: flex-start;
    padding: 4px 12px;
    background: #E8D9F5;
    color: #6b46a8;
    border: 1px solid #6b46a8;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-text-btn:hover {
    background: #6b46a8;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 70, 168, 0.2);
}

.expand-text-btn:active {
    transform: translateY(0);
}

.field-type-desc {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.9rem;
}

.field-type-icon {
    font-size: 0.9rem;
}

.field-type-text {
    font-size: 0.9rem;
}

.field-meta-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.conditions-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.conditions-badge svg {
    flex-shrink: 0;
}

.field-options-preview {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 4px;
    padding: 6px 10px;
    background: #f0f4ff;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 40px;
}

.field-calculation-preview {
    font-size: 0.85rem;
    color: #495057;
    margin-top: 4px;
    padding: 6px 10px;
    background: #e7f3ff;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-weight: 500;
}

.field-mirror-preview {
    font-size: 0.85rem;
    color: #495057;
    margin-top: 4px;
    padding: 6px 10px;
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-weight: 500;
}

.field-default-value {
    font-size: 0.85rem;
    color: #495057;
    margin-top: 4px;
    padding: 6px 10px;
    background: #f3f4f6;
    border-left: 3px solid #9ca3af;
    border-radius: 4px;
    font-weight: 500;
}

/* Field Properties Display */
.field-properties {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.property-badge {
    display: inline-block;
    padding: 3px 8px;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Field Conditions Display */
.field-conditions {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(139, 123, 196, 0.05);
    border-radius: 4px;
}

.conditions-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.condition-item {
    font-size: 0.8rem;
    color: #495057;
    padding: 2px 0;
    padding-left: 12px;
    position: relative;
}

.condition-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
}

.field-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.field-buttons .edit-btn {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.field-buttons .edit-btn:hover {
    background: #c3e6cb;
    border-color: #b1dfbb;
    transform: translateY(-1px);
}

.field-buttons .delete-btn {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.field-buttons .delete-btn:hover {
    background: #f5c6cb;
    border-color: #f1b0b7;
    transform: translateY(-1px);
}

/* Page Break Styles */
.page-break-item, .page-1-name-item {
    background: transparent !important;
    border: none !important;
    padding: 20px 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-break-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-break-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6B5B9A, transparent);
}

.page-break-label {
    color: #6B5B9A;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.page-break-name-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

.page-break-help-text {
    color: #6c757d;
    font-size: 0.75rem;
    text-align: center;
    font-style: italic;
    width: 100%;
    display: block;
    clear: both;
}

.page-badge {
    display: inline-block;
    background: #E8D9F5;
    color: #6b46a8;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.page-break-name-input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 100%;
    max-width: 400px;
    transition: border-color 0.2s;
}

.page-break-name-input:focus {
    outline: none;
    border-color: #6B5B9A;
    box-shadow: 0 0 0 3px rgba(155, 109, 212, 0.1);
}

/* Pagination Controls in Form Filling */
.page-controls {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-progress {
    text-align: center;
    font-size: 1rem;
    color: #6c757d;
    font-weight: 600;
}

.page-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.page-buttons button {
    flex: 1;
    max-width: 200px;
}

.layout-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.layout-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.page-size-controls, .orientation-controls {
    margin-top: 0;
    margin-bottom: 8px;
}

.page-size-controls label, .orientation-controls label {
    display: block;
}

/* Multi-Page Controls */
.page-controls {
    margin-bottom: 8px;
}

.page-options {
    margin-bottom: 8px;
}

.page-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.page-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.page-tab-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.page-tab {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    min-width: 50px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-tab:hover {
    border-color: #6B5B9A;
    background: #f8f9fa;
}

.page-tab.editing {
    background: white;
    border-color: #6B5B9A;
    cursor: default;
}

.page-tab-rename-input {
    background: white;
    border: 1px solid #6B5B9A;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    box-shadow: 0 0 0 3px rgba(155, 141, 212, 0.1);
}

/* Conditional page icon - shows lightning bolt on pages with conditional logic */
.conditional-page-icon {
    margin-left: 4px;
    font-size: 13px;
    opacity: 0.9;
    vertical-align: middle;
    display: inline-block;
}

.page-tab:not(.active) .conditional-page-icon {
    opacity: 0.6;
}

.page-tab-delete-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-tab-delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.page-tab.active {
    background: #E8D9F5;
    color: #6b46a8;
    border-color: #D4C5E8;
    font-weight: 600;
}

.page-tab-delete {
    font-size: 16px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
    margin-left: 4px;
}

.page-tab:hover .page-tab-delete {
    opacity: 1;
}

.page-tab-delete:hover {
    opacity: 1;
    color: #dc3545;
}

.add-page-btn {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.add-page-btn:hover {
    background: #c3e6cb;
    border-color: #b1dfbb;
}

.current-page-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6c757d;
}

.page-nav-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #495057;
}

.page-nav-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #6B5B9A;
    color: #6B5B9A;
}

.page-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.delete-page-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.delete-page-btn:hover {
    background: #c82333;
}

/* Drawing Tools */
.drawing-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.drawing-tool-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawing-tool-btn:hover {
    border-color: #6B5B9A;
    background: #f8f9fa;
    transform: translateX(2px);
}

.drawing-tool-btn.active {
    background: #8b7bc4;
    color: white;
    border-color: #6B5B9A;
}

/* Drawing Elements on Canvas */
.canvas-drawing-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    pointer-events: none;
}

.drawing-element {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    z-index: 5;
}

.drawing-element.selected {
    z-index: 15;
    outline: 2px solid #6B5B9A;
    outline-offset: 2px;
}

.drawing-line {
    background: #333;
    height: 2px;
    transform-origin: left center;
}

.drawing-rectangle {
    border: 2px solid #333;
    background: transparent;
}

.drawing-text {
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 14px;
    white-space: nowrap;
    background: transparent;
    border: 1px dashed transparent;
    padding: 2px 4px;
}

.drawing-text.editing {
    border-color: #6B5B9A;
    background: white;
    outline: none;
}
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #495057;
    cursor: default;
    gap: 0;
}

.page-size-controls select, .orientation-controls select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.designer-canvas-container {
    flex: 1;
    padding: 20px;
    overflow: auto;
    background: #f0f0f0;
    display: flex;
    justify-content: flex-start; /* CRITICAL: Align left so full canvas is scrollable */
    align-items: flex-start;
}

.designer-canvas {
    /* CRITICAL FIX: Display at actual PDF dimensions for true WYSIWYG (1:1 scale) */
    /* Canvas width/height set dynamically to match A4/A5 paper size (595x842px, etc) */
    /* Removed max-width/max-height - canvas shows actual size, container scrolls if needed */
    background: white;
    border: 1px solid #ccc;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 20px auto; /* Center the canvas with some spacing */
    flex-shrink: 0; /* CRITICAL: Prevent flexbox from shrinking canvas - force scrollbars */
}

.canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    display: none; /* Hidden by default */
}

/* Show grid when designer-canvas has show-grid class */
.designer-canvas.show-grid .canvas-grid {
    display: block;
}

.canvas-print-margins {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    /* CRITICAL FIX: 36pt margin at 1:1 scale = 36px exactly */
    border: 36px solid rgba(255, 140, 0, 0.15);
    box-sizing: border-box;
}

.canvas-fields {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.canvas-field {
    position: absolute;
    cursor: move;
    user-select: none;
    display: inline-block;
    z-index: 2;
    pointer-events: all;
}

.canvas-field.selected {
    z-index: 15;
}

.canvas-field.compact-preview {
    max-width: 250px;
    max-height: 80px;
    overflow: hidden;
}

.canvas-field.selected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.canvas-field.resizing {
    border-style: solid;
}

.canvas-field .field-label {
    font-weight: bold;
    color: #2c3e50 !important;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Title positioned above the value box (matches PDF layout exactly) */
.canvas-field .field-title-above {
    font-weight: bold;
    color: #2c3e50 !important;
    white-space: nowrap;
    background: transparent;
    pointer-events: none; /* Don't interfere with dragging */
    padding: 0;
    margin: 0;
    margin-bottom: 2px;
    display: block;
}

/* Value box container - matches the actual positioned field area */
.canvas-field .field-value-box {
    border: 1px dashed rgba(155,109,212,0.4); /* Thinner, semi-transparent border */
    background: rgba(111,66,193,0.05); /* Very transparent background for overlapping */
    padding: 0; /* CRITICAL: Zero padding for true WYSIWYG - boxes touching = text touching */
    min-width: 60px;
    min-height: 18px;
    border-radius: 2px; /* Smaller radius to minimize visual gap */
    width: fit-content;
    height: fit-content;
    display: inline-block;
    position: relative;
}

/* Field title inside the purple box - minimize spacing for WYSIWYG */
.canvas-field .field-title-in-box {
    margin: 0;
    padding: 0;
    line-height: 1; /* Tight line height to match PDF */
    white-space: nowrap; /* CRITICAL: Prevent text wrapping - box expands to fit content */
    color: #2c3e50 !important;
}

/* Field value inside the purple box - minimize spacing for WYSIWYG */
.canvas-field .field-type {
    margin: 0;
    padding: 0;
    line-height: 1; /* Tight line height to match PDF */
    white-space: nowrap; /* CRITICAL: Prevent text wrapping - box expands to fit content */
    font-size: 0.8rem;
    color: #6c757d !important;
    display: block;
    max-width: 300px;
}

/* Show ellipsis and maintain border when text overflows */
.canvas-field .field-type.text-overflow {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Selected field highlight - more visible */
.canvas-field.selected .field-value-box {
    border: 2px dashed #5B4B8A; /* Solid border when selected */
    background: rgba(111,66,193,0.25); /* More opaque when selected */
    box-shadow: 0 0 0 3px rgba(111,66,193,0.3);
}

/* Hover effect - make hovered field more visible */
.canvas-field:hover:not(.selected) .field-value-box {
    border: 1px dashed rgba(155,109,212,0.8); /* More visible border on hover */
    background: rgba(111,66,193,0.15); /* Slightly more opaque on hover */
}

.canvas-field .field-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 10;
}

.canvas-field:hover .field-remove-btn,
.canvas-field.selected .field-remove-btn {
    opacity: 1;
    pointer-events: auto;
}

.canvas-field .field-remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.canvas-field .field-properties-btn {
    position: absolute;
    top: -8px;
    right: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8b7bc4;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 10;
}

.canvas-field:hover .field-properties-btn,
.canvas-field.selected .field-properties-btn {
    opacity: 1;
    pointer-events: auto;
}

.canvas-field .field-properties-btn:hover {
    background: #5936a3;
    transform: scale(1.1);
}

.properties-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.properties-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.properties-section h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.font-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.visibility-controls {
    margin: 10px 0;
}

.visibility-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    color: #6B5B9A;
}

.size-input {
    width: 80px !important;
}

.field-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    color: #495057;
    font-style: italic;
    min-height: 20px;
}

/* Compact inputs for Field Properties modal */
#field-properties-modal input[type="number"],
#field-properties-modal input[type="text"],
#field-properties-modal select {
    padding: 8px 12px;
    font-size: 0.95rem;
    border-radius: 8px;
}

/* Lighter button fills for Field Properties modal */
#field-properties-modal .primary-button {
    background: #E8D9F5;
    color: #6b46a8;
    border: 1px solid #D4C5E8;
}

#field-properties-modal .primary-button:hover {
    background: #D4C5E8;
    border-color: #C0B0DC;
    transform: translateY(-1px);
}

#field-properties-modal .secondary-button {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}

#field-properties-modal .secondary-button:hover {
    background: #dee2e6;
    border-color: #ced4da;
    transform: translateY(-1px);
}

/* Choice Button Styles */
.choice-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.choice-button {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 1rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
    outline: none;
    font-weight: 500;
}

.choice-button:hover {
    border-color: #6B5B9A;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(111,66,193,0.15);
}

.choice-button.selected {
    background: #8b7bc4;
    border-color: #6B5B9A;
    color: white;
    box-shadow: 0 4px 12px rgba(111,66,193,0.3);
}

.choice-button:active {
    transform: translateY(0);
}

/* Submissions Screen Styles */
.submissions-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.form-selection {
    margin-bottom: 30px;
}

.form-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.form-selection-btn {
    background: #e9ecef;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.form-selection-btn:hover {
    background: #8b7bc4;
    color: white;
    border-color: #6B5B9A;
}

.form-selection-btn.selected {
    background: #8b7bc4;
    color: white;
    border-color: #6B5B9A;
}

.search-section {
    margin-top: 30px;
}

.search-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.search-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.search-container input {
    width: 100%;
    margin-bottom: 15px;
}

.search-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.search-container button {
    flex: 0 1 auto;
    min-width: 120px;
}

.results-section {
    min-height: 200px;
}

/* Filter buttons styling */
.filter-buttons-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.filter-button {
    background: white;
    border: 2px solid #6B5B9A;
    color: #6B5B9A;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-button:hover {
    background: #8b7bc4;
    color: white;
    transform: translateY(-1px);
}

.filter-button.active {
    background: #8b7bc4;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 123, 196, 0.3);
}

.filter-label {
    margin-right: 15px;
    font-weight: 600;
    color: #495057;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.results-table th {
    background: #8b7bc4;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.results-table tr:hover {
    background: #f8f9fa;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.header-right-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Authentication UI styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info .user-name {
    font-weight: 500;
    color: #2c3e50;
    white-space: nowrap;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c82333;
}

.login-btn {
    background: #8b7bc4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #5936a3;
}

.auth-loading {
    color: #6c757d;
    font-style: italic;
}

.header-submissions-btn {
    background: #28a745;
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.header-submissions-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.submissions-icon {
    font-size: 1.5rem;
}

/* Folder Selection Styles */
.folder-info {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #6B5B9A;
}

.folder-info p {
    margin: 5px 0;
}

.note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Digit Number Input Styles */
.digit-input {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-align: center;
    border: 2px solid #dee2e6;
    transition: border-color 0.3s ease;
}

.digit-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(111,66,193,0.15);
}

/* Unified Search Styles */
.unified-search-container {
    width: 100%;
    max-width: none;
    padding: 20px;
    margin-top: 15px;
}

.search-input-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: stretch;
}

.search-input {
    flex: 1;
    font-size: 1.1rem;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6B5B9A;
    box-shadow: 0 0 0 3px rgba(111,66,193,0.15);
}

.search-button {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    min-width: 120px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6B5B9A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#unified-loading-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#unified-no-results-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

#unified-no-results-message h4 {
    color: #333;
    margin-bottom: 10px;
}

.submission-result {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 20px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.submission-result:hover {
    border-color: #8b7bc4;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.submission-result.selected {
    border-color: #8b7bc4;
    background: linear-gradient(135deg, #f8f5ff 0%, #fcfaff 100%);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.result-form-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #6B5B9A;
}

.result-date {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
}

.result-preview {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.submission-detail {
    margin-top: 20px;
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.detail-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.detail-field {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.detail-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.detail-value {
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
}

.detail-value.empty {
    color: #999;
    font-style: italic;
}

.detail-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.detail-photo {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .screen {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .forms-list {
        grid-template-columns: 1fr;
    }
    
    .field-type-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .choices-group {
        grid-template-columns: 1fr;
    }
}

/* Customer Management UI Improvements */
.customer-actions-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.customer-actions-bar .search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    background: none;
    padding: 0;
    margin-bottom: 0;
    flex: 1;
    min-width: 300px;
}

.customer-actions-bar .search-container input {
    margin-bottom: 0;
    flex: 1;
    max-width: 350px;
}

.customer-actions-bar .search-container button {
    margin-bottom: 0;
    flex-shrink: 0;
}

.customer-actions-bar .action-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Modal header improvements */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    flex: 1;
}

.close-modal-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal-btn:hover {
    color: #333;
}

/* Modern Form Field Design System */
.modal-form-field {
    margin-bottom: 8px;
}

.modal-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.modal-form-field input,
.modal-form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.modal-form-field input:focus,
.modal-form-field textarea:focus {
    outline: none;
    border-color: #6B5B9A;
}

.modal-form-field textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Modal Layout Improvements */
.modal-body {
    padding: 0;
}

.modal-form-grid {
    display: grid;
    gap: 4px;
    padding: 8px 0;
}

/* Two-column responsive layout for larger screens */
@media (min-width: 600px) {
    .modal-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    
    .modal-form-field.full-width {
        grid-column: 1 / -1;
    }
}

/* Enhanced Modal Content */
.modal-content {
    padding: 24px;
    max-width: 600px;
}

/* Improved Modal Buttons */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(102, 126, 234, 0.15);
}

.modal-footer .primary-button,
.modal-footer .secondary-button {
    min-height: 48px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-footer .primary-button {
    background: #8b7bc4;
    border: none;
    color: white;
}

.modal-footer .primary-button:hover {
    background: #8B5DC4;
}

.modal-footer .secondary-button {
    background: rgba(108, 117, 125, 0.1);
    border: 2px solid rgba(108, 117, 125, 0.3);
    color: #6c757d;
}

.modal-footer .secondary-button:hover {
    background: rgba(108, 117, 125, 0.2);
    border-color: #6c757d;
}

/* Customer content container - transparent like forms-list */
.customer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Modular Settings Layout - Extracted to public/settings.css */

/* Customer ID Photo Styles */
.id-photo-field {
    position: relative;
    margin-top: 8px;
}

.photo-placeholder {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder:hover {
    border-color: #6B5B9A;
    background: #f3f0ff;
}

.photo-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.photo-icon {
    font-size: 2rem;
    opacity: 0.6;
}

.photo-text {
    color: #6c757d;
    font-size: 0.9rem;
}

.id-photo-preview {
    position: relative;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #dee2e6;
    background: white;
}

.id-photo-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    border-radius: 8px;
}

.download-photo-btn {
    position: absolute;
    top: 8px;
    right: 44px;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.download-photo-btn:hover {
    background: #6366f1;
    transform: scale(1.1);
}

.remove-photo-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-photo-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Customer ID Photo Field Styles */
.customer-id-photo-field {
    padding: 15px;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-id-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.customer-id-photo-placeholder .photo-icon {
    font-size: 2.5rem;
    color: #6c757d;
}

.customer-id-photo-placeholder p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

.customer-id-photo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.customer-id-photo-display {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #dee2e6;
    background: white;
}

.customer-id-photo-field:has(.customer-id-photo-container[style*="display: block"]) {
    border-color: #28a745;
    background: #f8fff9;
    border-style: solid;
}

/* Drawing Tools Enhancements */
.drawing-tool-btn {
    padding: 10px 15px;
    margin: 5px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.drawing-tool-btn:hover {
    border-color: #6B5B9A;
    background: #f8f9fa;
}

.drawing-tool-btn.active {
    border-color: #6B5B9A;
    background: #8b7bc4;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 123, 196, 0.3);
}

/* Canvas cursor states */
.crosshair-cursor {
    cursor: crosshair !important;
}

.drawing-mode {
    background-color: rgba(139, 123, 196, 0.02);
}

/* Drawing element styles */
.drawing-element {
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.drawing-element:hover {
    border-color: #6B5B9A;
    outline: 1px solid rgba(139, 123, 196, 0.3);
}

.drawing-element.selected {
    border-color: #6B5B9A !important;
    outline: 2px solid #6B5B9A !important;
    box-shadow: 0 0 0 1px rgba(139, 123, 196, 0.2);
}

.drawing-line {
    background-color: #000;
    min-height: 2px;
    border-radius: 1px;
}

.drawing-rectangle {
    border: 2px solid #000;
    background: transparent;
    min-width: 20px;
    min-height: 20px;
}

/* Dragging states */
.available-field.dragging,
.drawing-tool-btn.dragging {
    opacity: 0.6;
    transform: rotate(5deg) scale(0.95);
    border-color: #6B5B9A;
    background: #f8f9fa;
}

.canvas-drawing-element.dragging {
    z-index: 1000;
    opacity: 0.8;
    transform: scale(1.05);
}

/* Canvas drop zones */
.designer-canvas {
    transition: background-color 0.2s ease;
}

.designer-canvas.drag-over {
    background-color: rgba(139, 123, 196, 0.05);
    border-color: #6B5B9A;
}

.drawing-text {
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed transparent;
    font-family: Arial, sans-serif;
    color: #000;
    white-space: nowrap;
    min-width: 50px;
    min-height: 20px;
}

.drawing-text.selected {
    border-style: dashed;
    border-color: #6B5B9A;
    background: rgba(255, 255, 255, 0.95);
}

/* Resize handles */
.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #8b7bc4;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-radius: 2px;
    opacity: 0.9;
}

.resize-handle:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Drag and drop states */
.dragging {
    opacity: 0.6;
    transform: scale(0.95);
    transition: all 0.2s ease;
}

.drag-over {
    background-color: rgba(139, 123, 196, 0.05);
    border: 2px dashed rgba(139, 123, 196, 0.3);
}

/* Line-specific handle styling */
.line-handle {
    border-radius: 50% !important;
}

/* Missing Field Styles - Ensuring ALL field types have proper CSS */

/* Customer Lookup Field Styles */
.customer-lookup-container {
    margin: 10px 0;
    position: relative;
}

.customer-loading {
    color: #6c757d;
    font-style: italic;
    padding: 8px 0;
    text-align: center;
}

.customer-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.customer-select:focus {
    outline: none;
    border-color: #6B5B9A;
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

/* Searchable Dropdown Styles */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.customer-search {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.customer-search:focus {
    outline: none;
    border-color: #6B5B9A;
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

.dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
    user-select: none;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.dropdown-arrow:hover {
    color: #6B5B9A;
}

.customer-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e8ed;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.add-new-customer {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e1e8ed;
}

.dropdown-item.add-new-customer:hover {
    background-color: #e9ecef;
}

.dropdown-item.no-results {
    background-color: #f8f9fa;
    cursor: default;
}

.dropdown-item.no-results:hover {
    background-color: #f8f9fa;
}

/* Customer Search Wrapper */
.customer-search-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.customer-search-wrapper .searchable-dropdown {
    flex: 1;
}

.add-customer-btn {
    background: #8b7bc4;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    min-width: 50px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-customer-btn:hover {
    background: #9a8dd1;
}

.add-customer-btn:active {
    background: #4e2d85;
}

/* Customer Item Details */
.customer-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 2px;
}

.customer-address {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
}

.customer-meta {
    font-size: 11px;
    color: #6c757d;
}

/* Photo Field Container */
.photo-field-container {
    margin: 15px 0;
    text-align: center;
}

/* Drawing Field Styles */
.drawing-field-container {
    margin: 15px 0;
    text-align: center;
}

.drawing-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Signature Field Styles */
.signature-field-container {
    margin: 15px 0;
    text-align: center;
}

.signature-canvas {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
}

.signature-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Photo Message Styles */
.no-photo-message {
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border: 1px dashed #e1e8ed;
    border-radius: 8px;
}

.photo-label {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    text-align: center;
}

/* Static Text Field */
.static-text-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.static-text-label {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.static-text {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #8b7bc4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

.read-more-btn:hover {
    background-color: #8B5DC4;
}

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

/* Static Text Modal Styles */
.static-text-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.static-text-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.static-text-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.static-text-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.static-text-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.static-text-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.static-text-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.static-text-modal-body p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.static-text-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.static-text-modal-footer .btn-primary {
    padding: 10px 24px;
    background-color: #8b7bc4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.static-text-modal-footer .btn-primary:hover {
    background-color: #8B5DC4;
}

/* Field Help Text */
.field-help {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

/* Signature, Drawing, and Photo Placeholder Styles */
.signature-placeholder, .drawing-placeholder, .photo-placeholder {
    background: transparent;
    border: 2px dashed #6B5B9A;
    border-radius: 8px;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-placeholder:hover, .drawing-placeholder:hover, .photo-placeholder:hover {
    background: rgba(139, 123, 196, 0.05);
    border-color: #6B5B9A;
    box-shadow: 0 2px 8px rgba(139, 123, 196, 0.1);
}

.placeholder-text {
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}

.signature-preview, .drawing-preview {
    margin: 15px 0;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

/* CSV Upload Interface Styles */
.csv-upload-section {
    margin-bottom: 25px;
}

.csv-dropzone {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #f8f9ff 0%, #f3f4ff 100%);
    border: 3px dashed #6B5B9A;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.csv-dropzone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 123, 196, 0.05) 0%, rgba(139, 123, 196, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.csv-dropzone:hover {
    border-color: #5936a3;
    background: linear-gradient(135deg, #f0f1ff 0%, #e8eaff 100%);
    box-shadow: 0 8px 25px rgba(139, 123, 196, 0.15);
    transform: translateY(-2px);
}

.csv-dropzone:hover::before {
    opacity: 1;
}

.csv-dropzone.drag-over {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f8f0 100%);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.2);
}

.csv-dropzone-content {
    position: relative;
    z-index: 2;
}

.csv-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.csv-upload-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.csv-upload-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 0;
}

.csv-selected-file {
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid #28a745;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.csv-selected-file .file-icon {
    color: #28a745;
    font-size: 18px;
    font-weight: bold;
}

.csv-selected-file .file-name {
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;
}

.csv-requirements {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
}

.csv-requirements-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.csv-requirements-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
}

.requirement-item {
    font-size: 15px;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 8px;
}

.requirement-item strong {
    color: #6B5B9A;
    font-weight: 600;
}

/* Submissions Dropdown Interface Styles */
.submissions-dropdown-container {
    margin-bottom: 30px;
}

.dropdown-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.submissions-dropdown {
    width: 100%;
    min-width: 400px;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submissions-dropdown:focus {
    border-color: #8b7bc4;
    box-shadow: 0 0 0 3px rgba(139, 123, 196, 0.1);
}

.submissions-dropdown:hover {
    border-color: #8b7bc4;
}

/* Submission Detail View Styles */
.submission-detail-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.submission-detail-header h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.submission-detail-body {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.detail-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 0;
    text-transform: capitalize;
}

.detail-field-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.3;
}

.detail-field-value strong {
    font-size: 18px;
    color: #2c3e50;
}

/* Action Buttons Styles */
.submission-detail-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-action {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #8b7bc4;
    color: white;
    min-width: 140px;
}

.btn-action:hover {
    background: #9a8dd1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 123, 196, 0.3);
}

.btn-danger {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #dc3545;
    color: white;
    min-width: 140px;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Responsive adjustments for dropdown interface */
@media (max-width: 768px) {
    .submissions-dropdown {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .submission-detail-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-action,
    .btn-danger {
        width: 100%;
        max-width: 280px;
        margin-bottom: 10px;
    }
    
    .submission-detail-body {
        grid-template-columns: 1fr;
    }
    
    .detail-field {
        padding-left: 10px;
    }
    
    .detail-field-label {
        font-size: 13px;
    }
    
    .detail-field-value {
        font-size: 15px;
    }
    
    .detail-field-value strong {
        font-size: 17px;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .csv-dropzone {
        padding: 30px 15px;
    }
    
    .csv-upload-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .csv-upload-title {
        font-size: 18px;
    }
    
    .csv-upload-subtitle {
        font-size: 14px;
    }
    
    .csv-requirements {
        padding: 15px;
    }
    
    .requirement-item {
        font-size: 14px;
    }
}

/* Settings styles - all moved to public/settings.css */

.security-features {
    list-style: none;
    padding: 0;
    margin-top: 16px;
}

.security-features li {
    padding: 8px 0;
    color: #555;
    font-size: 0.95rem;
}

.contact-links {
    margin-top: 12px;
}

.contact-links p {
    margin-bottom: 8px;
}

.contact-links a {
    color: #6B5B9A;
    text-decoration: none;
}

.contact-links a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding: 20px;
    border-top: 2px solid rgba(155, 109, 212, 0.1);
}

.copyright p {
    margin-bottom: 8px;
    color: #666;
}

.copyright small {
    color: #999;
}

/* Subscription Paywall Overlay Styles */
.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.paywall-container {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.paywall-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.paywall-header {
    text-align: center;
    margin-bottom: 32px;
}

.paywall-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #5B4B8A;
    margin-bottom: 8px;
}

.paywall-header p {
    font-size: 16px;
    color: #666;
}

.paywall-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.paywall-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.05), rgba(0, 122, 255, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(175, 82, 222, 0.1);
    transition: all 0.3s ease;
}

.paywall-feature:hover {
    transform: translateY(-2px);
    border-color: rgba(175, 82, 222, 0.3);
    box-shadow: 0 4px 12px rgba(175, 82, 222, 0.1);
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px 0;
}

.feature-text p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.paywall-pricing {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.08), rgba(0, 122, 255, 0.08));
    border-radius: 16px;
    margin-bottom: 24px;
}

.price-tag {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.9), rgba(0, 122, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 20px;
    color: #666;
    font-weight: 500;
}

.price-note {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.paywall-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.paywall-btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
}

.paywall-btn-primary {
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.9), rgba(0, 122, 255, 0.8));
    color: white;
    box-shadow: 0 4px 12px rgba(175, 82, 222, 0.3);
}

.paywall-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(175, 82, 222, 0.4);
}

.paywall-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.paywall-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.paywall-contact {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 0;
}

.paywall-contact a {
    color: rgba(175, 82, 222, 0.9);
    text-decoration: none;
    font-weight: 500;
}

.paywall-contact a:hover {
    text-decoration: underline;
}

/* Large screen optimization - use more horizontal space */
@media (min-width: 1024px) {
    .screen {
        margin: 0;
    }
    
    .splash-container {
        padding: 0;
    }
    
    .splash-content {
        max-width: 100%;
    }
    
    .splash-main-content {
        align-items: stretch;
        padding: 2rem;
    }
    
    .forms-list {
        max-width: 100%;
    }
    
    .forms-container {
        padding: 1rem 2rem;
    }
    
    .submissions-content {
        max-width: 100%;
    }
    
    #form-builder-screen.active .splash-container,
    #designer-pdf-screen.active .splash-container {
        padding: 0;
    }
    
    #form-builder-screen.active .splash-content,
    #designer-pdf-screen.active .splash-content {
        max-width: 100%;
        height: 100vh;
    }
}

/* Extra large screens - edge-to-edge */
@media (min-width: 1440px) {
    .screen {
        margin: 0;
    }
    
    .splash-container {
        padding: 0;
    }
    
    .splash-content {
        max-width: 100%;
    }
    
    .splash-main-content {
        align-items: stretch;
        padding: 1.5rem;
    }
    
    .forms-list {
        max-width: 100%;
    }
    
    .forms-container {
        padding: 1rem 1.5rem;
    }
    
    .submissions-content {
        max-width: 100%;
    }
    
    #form-builder-screen.active .splash-container,
    #designer-pdf-screen.active .splash-container {
        padding: 0;
    }
    
    #form-builder-screen.active .splash-content,
    #designer-pdf-screen.active .splash-content {
        max-width: 100%;
        height: 100vh;
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .paywall-content {
        padding: 24px;
    }
    
    .paywall-header h2 {
        font-size: 24px;
    }
    
    .price-amount {
        font-size: 36px;
    }
    
    .feature-icon {
        font-size: 24px;
    }
}


/* Green Field Editing Buttons */
#save-field-btn-sidebar,
#save-field-btn {
    background: #d4edda !important;
    color: #28a745 !important;
    border: 1px solid #c3e6cb !important;
}

#save-field-btn-sidebar:hover,
#save-field-btn:hover {
    background: #c3e6cb !important;
    border-color: #b1dfbb !important;
