:root {
    --primary-color: #1e293b;
    --primary-light: #334155;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --accent: #0f172a;
    --accent-hover: #1e293b;
    --accent-light: #f1f5f9;
    
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-focus: #0f172a;
    
    --sidebar-bg: #111827;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #ffffff;
    --sidebar-hover: #1f2937;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden;
}

/* APP LAYOUT */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* SIDEBAR STYLES */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid #1f2937;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1f2937;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background-color: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 0 12px rgba(15, 23, 42, 0.2);
}

.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

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

.sidebar-menu {
    flex-grow: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    background: none;
    border: none;
    outline: none;
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition);
}

.menu-item i {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.menu-item:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.menu-item.active {
    background-color: #ffffff;
    color: #111827;
    font-weight: 600;
}

.menu-item.active i {
    color: #111827;
}

.sidebar-footer {
    padding: 24px 16px;
    border-top: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #1f2937;
    border: 2px solid #374151;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-email {
    font-size: 0.85rem;
    color: var(--sidebar-text-active);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.coin-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    background-color: #374151;
    color: #fbbf24;
    padding: 2px 8px;
    border-radius: 9999px;
    width: fit-content;
    font-size: 0.75rem;
    font-weight: 600;
}

.coin-badge i {
    width: 12px;
    height: 12px;
}

.active-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--sidebar-text);
    background-color: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

/* MAIN CONTENT STYLES */
.main-content {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

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

.content-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.content-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* WORKSPACE GRID Layout (Two Columns) */
.workspace-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
    align-items: start;
    flex-grow: 1;
}

/* CARD SYSTEM */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header i {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    padding: 24px;
}

/* FORM STYLES */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.label-with-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-with-value span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background-color: var(--accent-light);
    padding: 2px 8px;
    border-radius: 9999px;
}

.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-with-action label {
    margin-bottom: 0 !important;
}

.btn-text-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-text-action:hover {
    background-color: var(--bg-input);
    color: var(--text-main);
}

.btn-text-action i {
    width: 14px;
    height: 14px;
    color: #fbbf24;
}

input[type="text"], select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-input);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

input[type="text"]:focus, select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.10);
    background-color: white;
}

/* RANGE INPUT STYLING */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 9999px;
    outline: none;
    margin: 12px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 4px rgba(15, 23, 42, 0.3);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* CHIPS (Ethnicity selection) */
.ethnicity-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.chip:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
    border-color: var(--text-light);
}

.chip.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

/* COLLAPSIBLE SECTION STYLES */
.collapsible-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    overflow: hidden;
    background-color: var(--bg-card);
}

.collapsible-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.collapsible-trigger:hover {
    background-color: var(--bg-input);
}

.collapsible-trigger i {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease-in-out;
}

.collapsible-trigger.active i {
    transform: rotate(180deg);
}

.collapsible-content {
    padding: 18px 18px 4px 18px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.gender-chips, .skin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* DROPZONE STYLES */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    background-color: var(--bg-input);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--border-focus);
    background-color: rgba(15, 23, 42, 0.02);
}

.dropzone-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropzone-icon {
    width: 32px;
    height: 32px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.dropzone-text {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.dropzone-text span {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 600;
}

.dropzone-sub {
    font-size: 0.75rem;
    color: var(--text-light);
}

.dropzone-preview {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 12px;
    background-color: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone-preview img {
    max-height: 120px;
    max-width: 100%;
    border-radius: var(--radius-md);
    object-fit: contain;
    box-shadow: var(--shadow-sm);
}

.btn-remove-img {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    outline: none;
    transition: var(--transition);
}

.btn-block {
    display: flex;
    width: 100%;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-primary:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-accent {
    background-color: #10b981;
    color: white;
}

.btn-accent:hover {
    background-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

/* RESULTS CARD SPECIFIC */
.result-card {
    height: 100%;
    min-height: 520px;
}

.result-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    position: relative;
    padding: 0;
}

/* EMPTY STATE */
.empty-state {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 360px;
}

.empty-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.empty-icon {
    width: 28px;
    height: 28px;
    color: var(--text-light);
}

.empty-state h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* LOADING STATE */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* RESULT CONTENT */
.result-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.result-char-info {
    margin-bottom: 18px;
}

.result-char-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.result-char-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* TABS SYSTEM */
.result-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

.result-tab-content {
    display: none;
    flex-direction: column;
    flex-grow: 1;
}

.result-tab-content.active {
    display: flex;
}

/* PROMPT BOX */
.prompt-box-wrapper {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    background-color: #0f172a; /* Slate 900 for code blocks */
}

.prompt-box-header {
    background-color: #1e293b;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.prompt-box-header span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.prompt-box-header .btn-icon {
    color: #94a3b8;
}

.prompt-box-header .btn-icon:hover {
    background-color: #334155;
    color: white;
}

.prompt-text {
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 240px;
    overflow-y: auto;
    line-height: 1.6;
}

.actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* INFO / WARNING ALERTS */
.info-alert, .warning-alert, .info-alert-light {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.info-alert {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.info-alert i {
    color: var(--accent);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.warning-alert {
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #b45309;
}

.warning-alert i {
    color: #d97706;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* DETAIL DESCRIPTION TRAITS */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.detail-item {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* IMAGEN IMAGE TAB */
.image-generation-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.generated-image-box {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-lg);
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.generated-image-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

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

.placeholder-icon {
    width: 48px;
    height: 48px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.image-placeholder {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
}

.image-placeholder p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.image-spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.image-spinner-wrapper p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.image-gen-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* RIWAYAT / HISTORY VIEW */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.history-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-card);
    transition: var(--transition);
}

.history-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.history-image {
    width: 100%;
    height: 140px;
    background-color: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-image i {
    width: 32px;
    height: 32px;
    color: var(--text-light);
}

.history-details {
    padding: 16px;
}

.history-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.history-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.history-actions .btn {
    flex-grow: 1;
    font-size: 0.8rem;
    padding: 8px 12px;
}

/* SETTINGS VIEW SPECIFIC */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.settings-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-toggle-password:hover {
    color: var(--text-main);
}

.btn-toggle-password i {
    width: 18px;
    height: 18px;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.save-status-msg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: 0.9rem;
    font-weight: 500;
}

.save-status-msg i {
    width: 18px;
    height: 18px;
}

.alert-card {
    border-color: var(--accent-light);
    background-color: var(--bg-app);
}

.security-alert-body {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    align-items: flex-start;
}

.security-icon {
    width: 32px;
    height: 32px;
    color: #10b981;
    flex-shrink: 0;
}

.security-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.security-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* TOAST STYLES */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast-info {
    border-left: 4px solid var(--accent);
}

.toast-info i {
    color: var(--accent);
}

.toast-message {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    flex-grow: 1;
}

/* RESPONSIVENESS */
@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-bottom: 1px solid #1f2937;
        border-right: none;
    }
    .sidebar-brand {
        padding: 16px;
    }
    .sidebar-menu {
        flex-direction: row;
        padding: 8px 16px;
        overflow-x: auto;
        gap: 4px;
    }
    .menu-item {
        padding: 8px 12px;
        white-space: nowrap;
    }
    .sidebar-footer {
        display: none; /* Hide footer on mobile to save space */
    }
    .main-content {
        padding: 20px;
    }
}

/* POSE MODEL TAB STYLING */
.pose-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-height: 650px;
    overflow-y: auto;
    padding: 4px;
}

.pose-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.pose-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-focus);
}

.pose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-input);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.pose-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.pose-header-actions {
    display: flex;
    gap: 4px;
}

.pose-body {
    padding: 16px;
    background-color: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pose-prompt-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: var(--text-main);
    white-space: pre-wrap;
    margin: 0;
    line-height: 1.5;
    background-color: #fafafa;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    flex-grow: 1;
}

.custom-pose-textarea {
    width: 100%;
    height: 75px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: var(--transition);
}

.custom-pose-textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.05);
}

.pose-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border-top: 1px solid var(--border-color);
}

.btn-pose-action {
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* VIDEO DROPZONE FOCUS STYLING */
#video-dropzone:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.10);
    outline: none;
}

