:root {
    --primary: #2364aa;
    --primary-dark: #163f6d;
    --secondary: #0f172a;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --radius: 18px;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(35, 100, 170, 0.25), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #1e3a5f 52%, #2364aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 430px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    padding: 36px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.logo-mark,
.brand-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 1px;
}

.login-logo h1 {
    margin: 0;
    font-size: 25px;
    color: var(--secondary);
}

.login-logo p {
    margin: 8px 0 0;
    color: var(--muted);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

.form-group textarea {
    min-height: 130px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(35, 100, 170, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 13px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-danger {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.login-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.app-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    background: #0f172a;
    color: #dbeafe;
    padding: 22px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-icon {
    margin: 0;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    flex: 0 0 auto;
}

.brand strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.brand span {
    display: block;
    color: #93c5fd;
    font-size: 13px;
    margin-top: 3px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    color: #cbd5e1;
    transition: 0.2s;
    font-size: 15px;
}

.menu a span {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.menu a:hover,
.menu a.active {
    background: rgba(59, 130, 246, 0.22);
    color: #fff;
}

.sidebar-footer {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.14);
    color: #fecaca;
    text-align: center;
}

.main-content {
    margin-left: 280px;
    padding: 28px;
    width: calc(100% - 280px);
}

.topbar {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
    color: var(--secondary);
}

.topbar p {
    margin: 7px 0 0;
    color: var(--muted);
}

.user-box {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: var(--primary-dark);
    border-radius: 14px;
    padding: 11px 14px;
    text-align: right;
}

.user-box span {
    display: block;
    font-weight: 800;
}

.user-box small {
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.7);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.stat-card strong {
    display: block;
    margin: 10px 0;
    color: var(--secondary);
    font-size: 34px;
}

.stat-card small {
    color: var(--muted);
}

.stat-card.danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.stat-card.danger strong {
    color: var(--danger);
}

.content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 22px;
}

.panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h2 {
    margin: 0;
    font-size: 19px;
    color: var(--secondary);
}

.panel-header a {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-weight: 800;
}

td small {
    color: var(--muted);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 30px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
    font-weight: 800;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    margin-left: 6px;
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .app-layout {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 18px;
    }

    .topbar {
        display: block;
    }

    .user-box {
        margin-top: 16px;
        text-align: left;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
.mb-24 {
    margin-bottom: 24px;
}

.mt-24 {
    margin-top: 24px;
}

.muted {
    color: var(--muted);
}

.btn-light {
    color: var(--secondary);
    background: #f1f5f9;
    border: 1px solid var(--border);
}

.btn-danger {
    color: #fff;
    background: var(--danger);
}

.btn-small {
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 13px;
}

.filter-form {
    padding: 20px 22px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr auto;
    gap: 16px;
    align-items: end;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.align-end {
    align-self: end;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.inline-form select {
    min-height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 6px 8px;
    background: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-list {
    padding: 20px 22px;
    display: grid;
    gap: 12px;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.detail-list strong {
    color: var(--secondary);
}

.detail-list span {
    color: var(--muted);
    text-align: right;
}

.text-box,
.transcript-box {
    padding: 22px;
    line-height: 1.7;
    color: var(--text);
}

.transcript-box {
    background: #f8fafc;
    white-space: normal;
}

.mini-section {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.mini-section h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.mini-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
}

.danger-soft {
    background: #fff7f7;
    border-color: #fecaca;
}

.form-panel {
    padding-bottom: 22px;
}

.form-panel form {
    padding: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 160px 120px;
    gap: 16px;
    align-items: end;
}

.checkbox-group {
    display: flex;
    align-items: center;
    min-height: 70px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.checkbox-group input {
    width: auto;
    min-height: auto;
}

.knowledge-list {
    padding: 18px;
    display: grid;
    gap: 14px;
}

.knowledge-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.knowledge-card.passive {
    opacity: 0.6;
    background: #f8fafc;
}

.knowledge-title-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.knowledge-title-row h3 {
    margin: 0;
    font-size: 18px;
}

.card-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 260px;
    justify-content: flex-end;
}

.badge-muted {
    background: #e5e7eb;
    color: #374151;
}

@media (max-width: 1180px) {
    .filter-form,
    .detail-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-card {
        display: block;
    }

    .card-actions {
        margin-top: 14px;
        justify-content: flex-start;
        min-width: auto;
    }
}
.table-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
}

.content-grid > .form-panel {
    align-self: start;
}

@media (max-width: 1180px) {
    .table-actions {
        justify-content: flex-start;
    }
}
.alert-success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.form-help {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 7px;
}

.badge-action {
    background: #ede9fe;
    color: #5b21b6;
}

.settings-panel {
    max-width: 1180px;
}

.form-section-title {
    margin: 8px 0 18px;
    padding-bottom: 10px;
    color: var(--secondary);
    border-bottom: 1px solid var(--border);
    font-size: 18px;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 820px) {
    .form-grid-two {
        grid-template-columns: 1fr;
    }
}
.ai-demo-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 22px;
}

.ai-chat-panel {
    min-height: 650px;
    display: flex;
    flex-direction: column;
}

.ai-chat-box {
    flex: 1;
    padding: 22px;
    background: #f8fafc;
    overflow-y: auto;
    max-height: 520px;
}

.chat-message {
    display: flex;
    margin-bottom: 14px;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.assistant {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 78%;
    padding: 14px 16px;
    border-radius: 18px;
    line-height: 1.55;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.chat-message.assistant .chat-bubble {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 6px;
}

.chat-message.user .chat-bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.ai-chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.ai-chat-form textarea {
    min-height: 54px;
    max-height: 150px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 14px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
}

.ai-chat-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(35, 100, 170, 0.12);
}

.demo-prompts {
    padding: 18px;
    display: grid;
    gap: 10px;
}

.demo-prompts button {
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: 14px;
    padding: 13px 14px;
    text-align: left;
    cursor: pointer;
    color: var(--secondary);
    font-weight: 700;
}

.demo-prompts button:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.ai-info-box {
    margin: 0 18px 18px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.ai-info-box h3 {
    margin: 0 0 10px;
    color: var(--secondary);
}

.ai-info-box p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 1180px) {
    .ai-demo-layout {
        grid-template-columns: 1fr;
    }

    .ai-chat-panel {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .ai-chat-form {
        grid-template-columns: 1fr;
    }

    .chat-bubble {
        max-width: 92%;
    }
}
.note-cell {
    min-width: 320px;
    max-width: 520px;
    white-space: normal;
}

.note-cell details {
    cursor: pointer;
}

.note-cell summary {
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

.note-detail {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    line-height: 1.5;
    max-height: 260px;
    overflow-y: auto;
    white-space: normal;
}
/* AI Demo - uygun saat kartları */
.time-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.time-slot-button {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 62px;
    text-align: left;
    padding: 10px 12px !important;
}

.time-slot-hour {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
}

.time-slot-doctors {
    margin-top: 4px;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.3;
}

@media (max-width: 700px) {
    .time-buttons-grid {
        grid-template-columns: 1fr;
    }
}
.calendar-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.calendar-slot-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 16px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    min-height: 126px;
    transition: .15s ease;
}

.calendar-slot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.slot-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.slot-time {
    font-weight: 800;
    font-size: 20px;
    color: #111827;
}

.slot-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.pill-open {
    background: #dcfce7;
    color: #166534;
}

.pill-booked {
    background: #dbeafe;
    color: #1d4ed8;
}

.pill-closed {
    background: #fee2e2;
    color: #b91c1c;
}

.slot-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slot-card-body strong {
    color: #111827;
    font-size: 15px;
}

.slot-card-body small {
    color: #4b5563;
    line-height: 1.35;
}

.calendar-slot-card.slot-open {
    border-left: 5px solid #22c55e;
}

.calendar-slot-card.slot-booked {
    border-left: 5px solid #2563eb;
}

.calendar-slot-card.slot-closed {
    border-left: 5px solid #ef4444;
    background: #fff7f7;
}