/* ============================================
   IronsrtLabs — Основные стили
   ============================================ */

/* === CSS Variables === */
:root {
    --color-bg: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-secondary: #666666;
    --color-text-muted: #9CA3AF;
    --color-sidebar-bg: #FAFAFA;
    --color-border: #E5E5E5;
    --color-accent: #000000;
    --color-accent-hover: #333333;
    --color-selected: #E8F4FD;
    --color-generated: #4CAF50;
    --color-not-generated: #D0D0D0;
    --color-pause: #FFF3E0;
    --color-error: #EF4444;
    --color-success: #22C55E;
    --color-link: #2563EB;

    --radius-card: 8px;
    --radius-btn: 6px;
    --radius-input: 4px;

    --sidebar-width: 220px;
    --topbar-height: 56px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
}

a {
    color: var(--color-link);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

img { max-width: 100%; }

/* === Typography === */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--color-accent);
    color: #FFFFFF;
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    text-decoration: none;
}
.btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover {
    background: #F5F5F5;
    text-decoration: none;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

/* === Form === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    outline: none;
    transition: border-color 0.15s ease;
}
.form-input:focus {
    border-color: var(--color-accent);
}
.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #FEF2F2;
    color: var(--color-error);
    border-radius: var(--radius-input);
    font-size: 14px;
}

.form-note {
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.input-with-icon {
    position: relative;
}
.input-with-icon .form-input {
    padding-right: 44px;
}
.input-icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
}
.input-icon-btn:hover {
    color: var(--color-text);
}

/* ============================================
   LANDING PAGE
   ============================================ */

.landing-body {
    background: var(--color-bg);
}

/* Landing Header */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}

.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.landing-header .landing-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.landing-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}
.landing-logo:hover {
    text-decoration: none;
}

/* Hero */
.hero {
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    max-width: 520px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-decoration {
    position: relative;
    width: 340px;
    height: 340px;
    flex-shrink: 0;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
}

.hero-circle-1 {
    width: 280px;
    height: 280px;
    top: 30px;
    left: 30px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.08), transparent 70%);
    animation: pulse-slow 6s ease-in-out infinite;
}

.hero-circle-2 {
    width: 200px;
    height: 200px;
    top: 80px;
    left: 80px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12), rgba(236, 72, 153, 0.06), transparent 70%);
    animation: pulse-slow 6s ease-in-out infinite 3s;
}

.hero-wave {
    position: absolute;
    bottom: 80px;
    left: 20px;
    width: 300px;
    opacity: 0.7;
}

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.7; }
}

/* Features */
.features {
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--color-sidebar-bg);
    border-radius: 12px;
    color: var(--color-text);
    margin-bottom: 20px;
}

.feature-title {
    margin-bottom: 10px;
}

.feature-text {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* How it works */
.how-it-works {
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.step-card {
    text-align: center;
    padding: 24px;
    max-width: 260px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.step-title {
    margin-bottom: 8px;
}

.step-text {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 44px;
}

/* Footer */
.landing-footer {
    padding: 32px 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-body {
    background: var(--color-sidebar-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 40px 32px;
}

.login-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 8px;
}

.login-title {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 28px;
}

.login-form .btn-full {
    margin-top: 8px;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

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

/* ============================================
   APP LAYOUT (Sidebar + Main)
   ============================================ */

.app-body {
    overflow: hidden;
}

.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-top {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    display: block;
}
.sidebar-logo:hover {
    text-decoration: none;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.12s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-family);
    width: 100%;
    text-align: left;
}
.sidebar-link:hover {
    background: var(--color-border);
    color: var(--color-text);
    text-decoration: none;
}
.sidebar-link.active {
    background: var(--color-bg);
    color: var(--color-text);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.sidebar-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}
.sidebar-link.active svg,
.sidebar-link:hover svg {
    opacity: 1;
}

.sidebar-badge {
    margin-left: auto;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-border);
    border-radius: 4px;
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 400;
}

.sidebar-bottom {
    padding: 12px 8px;
    border-top: 1px solid var(--color-border);
}

.sidebar-logout {
    color: var(--color-text-muted);
}
.sidebar-logout:hover {
    color: var(--color-error);
}

/* Main Area */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
}
.top-bar-title svg {
    opacity: 0.5;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-family: var(--font-family);
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.12s ease;
}
.top-bar-btn:hover {
    background: var(--color-sidebar-bg);
}
.top-bar-btn svg {
    opacity: 0.6;
}

.top-bar-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.12s ease;
}
.top-bar-icon:hover {
    background: var(--color-sidebar-bg);
    color: var(--color-text);
}

/* Page Content */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* ============================================
   DASHBOARD — «Текст в Речь»
   ============================================ */

.dashboard-layout {
    display: flex;
    gap: 0;
    height: 100%;
}

.dashboard-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
}

.dashboard-right {
    width: 340px;
    min-width: 340px;
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Textarea */
.tts-textarea-wrap {
    flex: 1;
    padding: 24px 32px;
    display: flex;
}

.tts-textarea {
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: none;
    outline: none;
    resize: none;
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    background: transparent;
}
.tts-textarea::placeholder {
    color: var(--color-text-muted);
}

/* Bottom bar */
.tts-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    flex-shrink: 0;
}

.tts-bottom-left {
    display: flex;
    align-items: center;
}

.credits-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.tts-bottom-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.char-counter {
    font-size: 13px;
    color: var(--color-text-muted);
}

.tts-download-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.12s ease;
}
.tts-download-btn:hover:not(:disabled) {
    background: var(--color-sidebar-bg);
    color: var(--color-text);
}
.tts-download-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Quick Player */
.quick-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 32px;
    border-top: 1px solid var(--color-border);
    background: var(--color-sidebar-bg);
}

.player-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s ease;
}
.player-btn:hover {
    background: var(--color-accent-hover);
}

.player-progress-wrap {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.player-progress-bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-time {
    font-size: 13px;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Right panel */
.right-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    padding: 0 20px;
    flex-shrink: 0;
}

.right-tab {
    padding: 14px 16px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.12s ease;
}
.right-tab:hover {
    color: var(--color-text);
}
.right-tab.active {
    color: var(--color-text);
    font-weight: 500;
    border-bottom-color: var(--color-accent);
}

.right-tab-content {
    display: none;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.right-tab-content.active {
    display: block;
}

.right-section {
    margin-bottom: 20px;
}

.right-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.form-select:focus {
    border-color: var(--color-accent);
}

.right-add-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--color-text-muted);
}
.right-add-link:hover {
    color: var(--color-text);
}

/* History items */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
    padding: 40px 0;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-btn);
    transition: background 0.1s ease;
}
.history-item:hover {
    background: var(--color-sidebar-bg);
}

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

.history-item-text {
    display: block;
    font-size: 13px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-meta {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.history-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.history-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.12s ease;
}
.history-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--color-bg);
    border-radius: var(--radius-card);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}
.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 24px 20px;
}

/* Page content override for dashboard */
.page-content:has(.dashboard-layout) {
    padding: 0;
    overflow: hidden;
}

/* Stub */
.stub-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.stub-inner {
    text-align: center;
}

.stub-title {
    margin-top: 16px;
    color: var(--color-text-muted);
}

.stub-text {
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */

.settings-page {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border);
}
.settings-section:last-of-type {
    border-bottom: none;
}

.settings-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.settings-hint {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.settings-actions {
    padding-top: 8px;
}

/* Service Account Status */
.sa-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #FEF2F2;
    border-radius: var(--radius-card);
    margin-bottom: 16px;
}
.sa-status.sa-status-ok {
    background: #F0FDF4;
}

.sa-status-icon {
    flex-shrink: 0;
    display: flex;
}

.sa-status-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sa-status-label {
    font-size: 14px;
    font-weight: 500;
}

.sa-status-email {
    font-size: 12px;
    color: var(--color-text-muted);
    word-break: break-all;
}

.sa-upload-btn {
    cursor: pointer;
    display: inline-flex;
    margin-bottom: 8px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    min-width: 260px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.toast-show {
    transform: translateX(0);
}

.toast-success {
    border-left: 3px solid var(--color-success);
}

.toast-error {
    border-left: 3px solid var(--color-error);
}

.toast-message {
    flex: 1;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-decoration {
        width: 200px;
        height: 200px;
    }

    .hero-circle-1 {
        width: 160px;
        height: 160px;
        top: 20px;
        left: 20px;
    }

    .hero-circle-2 {
        width: 120px;
        height: 120px;
        top: 40px;
        left: 40px;
    }

    .hero-wave {
        width: 160px;
        bottom: 40px;
        left: 10px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        transform: rotate(90deg);
        padding-top: 0;
    }

    .sidebar {
        display: none;
    }

    .top-bar-btn span:not(.top-bar-icon) {
        display: none;
    }
}

/* ============================================
   PROMPTS PAGE
   ============================================ */

.prompts-page {
    max-width: 900px;
}

.prompts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.prompts-title {
    font-size: 24px;
    font-weight: 700;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.prompts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--color-text-muted);
    text-align: center;
}

/* Prompt Card */
.prompt-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 20px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.prompt-card:hover {
    border-color: #CCC;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.prompt-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.prompt-card-name {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prompt-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: #F0FDF4;
    color: #16A34A;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 500;
}

.prompt-card-text {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    min-height: 40px;
}

.prompt-card-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* Icon Buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-icon:hover {
    background: #F5F5F5;
    color: var(--color-text);
    border-color: #CCC;
}
.btn-icon-danger:hover {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

/* Danger Button */
.btn-danger {
    background: #DC2626;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-button);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-danger:hover {
    background: #B91C1C;
}

/* Prompt textarea in modal */
.prompt-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 20px;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-card-sm {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}
.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 24px 20px;
}
