/* fitSuite Authentication Styles */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #6b7280;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --background: #f3f4f6;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --input-border: #d1d5db;
    --input-focus: #4f46e5;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Auth Pages Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: var(--text-muted);
}

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

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    font-family: monospace;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-google {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-google:hover {
    background: var(--background);
}

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

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* App Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-nav {
    background: var(--card-bg);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.app-main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card-wide {
    grid-column: 1 / -1;
}

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

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.info-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.info-value {
    font-weight: 500;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.status-enabled {
    background: #f0fdf4;
    color: var(--success);
}

.status-disabled {
    background: #fef3c7;
    color: var(--warning);
}

/* Security Status */
.security-status {
    margin-bottom: 1rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--background);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s;
}

.action-card:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.action-card svg {
    color: var(--primary);
}

.action-card span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* 2FA Setup */
.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.step {
    display: flex;
    gap: 1rem;
}

.step-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.qr-code {
    background: white;
    padding: 1rem;
    display: inline-block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.qr-code img {
    display: block;
    max-width: 200px;
}

.manual-entry {
    font-size: 0.875rem;
}

.manual-entry summary {
    cursor: pointer;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.secret-code {
    display: block;
    background: var(--background);
    padding: 0.5rem;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

.verify-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.verify-form .form-group {
    flex: 1;
}

.verify-form .btn {
    flex-shrink: 0;
}

/* 2FA Verification Page */
.verify-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.verify-info svg {
    margin-bottom: 1rem;
}

.verify-info p {
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.verify-info strong {
    display: block;
    color: var(--text);
}

/* Sections */
.section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.inline-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

/* Skip Link */
.skip-link {
    text-align: center;
    margin-top: 1.5rem;
}

.skip-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.skip-link a:hover {
    color: var(--primary);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}

.tab:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.tab.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-state svg {
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Products Section */
.product-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: box-shadow 0.15s;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-card.inactive {
    opacity: 0.7;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.product-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-inactive {
    background: #fef3c7;
    color: #92400e;
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.billing-interval {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.product-meta svg {
    flex-shrink: 0;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.product-actions .inline-form {
    margin: 0;
    flex-direction: row;
}

/* Button Variants */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--background);
    border-color: var(--secondary);
}

.btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.btn-danger-outline:hover {
    background: #fef2f2;
}

/* Product Form */
.product-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group select,
.form-group textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.input-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix span {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: var(--background);
    border: 1px solid var(--input-border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text-muted);
    font-weight: 500;
}

.input-prefix input {
    border-radius: 0 var(--radius) var(--radius) 0;
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Image Upload */
.image-upload {
    position: relative;
}

.image-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.image-upload-preview {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--background);
    min-height: 180px;
    position: relative;
}

.image-upload-preview:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.image-upload-preview.dragover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.image-upload-preview span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.image-upload-preview small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.image-upload-preview.has-image {
    padding: 0;
    border-style: solid;
    border-color: var(--border);
    overflow: hidden;
}

.image-upload-preview.has-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.btn-remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}

.btn-remove-image:hover {
    background: var(--danger);
}

/* Product Image in Card */
.product-image {
    margin: -1.5rem -1.5rem 0 -1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

/* Business Settings */
.business-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.subdomain-input {
    display: flex;
    align-items: stretch;
}

.subdomain-input input {
    flex: 1;
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
}

.subdomain-suffix {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: var(--background);
    border: 1px solid var(--input-border);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.color-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 50px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    cursor: pointer;
}

.color-input-wrapper input[type="text"] {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    font-family: monospace;
}

.branding-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.branding-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.branding-section h3 {
    margin-bottom: 0.75rem;
}

.current-image {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.current-image img {
    max-width: 200px;
    max-height: 100px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.current-image.hero-preview img {
    max-width: 100%;
    max-height: 150px;
}

.remove-image-form {
    margin-top: 0.5rem;
}

.file-upload {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.file-upload input[type="file"] {
    flex: 1;
}

.hours-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hour-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.hour-row:last-child {
    border-bottom: none;
}

.day-name {
    font-weight: 500;
}

.hour-time {
    color: var(--text-muted);
}

/* Page Editor */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab {
    background: none;
    border: none;
    cursor: pointer;
}

.sections-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: grab;
}

.section-item.dragging {
    opacity: 0.5;
}

.section-handle {
    color: var(--text-muted);
    cursor: grab;
}

.section-info {
    flex: 1;
}

.section-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    display: block;
    font-weight: 500;
}

.section-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

.section-status.visible {
    background: #dcfce7;
    color: #16a34a;
}

.section-status.hidden {
    background: #f3f4f6;
    color: #6b7280;
}

.hours-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hour-edit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hour-edit-row .day-name {
    width: 100px;
}

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

.hour-inputs input[type="time"] {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
}

/* Members */
.members-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.data-table tbody tr:hover {
    background: var(--background);
}

.member-name {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.member-name:hover {
    text-decoration: underline;
}

.status-badge.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

.actions-cell .inline-form {
    margin: 0;
    flex-direction: row;
}

/* Member Details */
.member-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h2 {
    margin-bottom: 0;
}

.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: var(--radius);
}

.purchase-item.inactive {
    opacity: 0.6;
}

.purchase-name {
    font-weight: 500;
}

.purchase-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.purchase-details {
    text-align: right;
}

.purchase-details .sessions {
    display: block;
    font-weight: 500;
}

.purchase-details .expires {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.empty-state.small {
    padding: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
    }

    .app-nav {
        padding: 1rem;
    }

    .app-main {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .verify-form {
        flex-direction: column;
    }

    .verify-form .btn {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}
