/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Theme: Ocean (Default) */
    --primary-h: 217;
    --primary-s: 91%;
    --primary-l: 60%;
    
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-hover: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 8%));
    --primary-glow: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.25);
    
    /* Light Mode Default Variables */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(255, 255, 255, 0.5);
    --border-color: #e2e8f0;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-white: #ffffff;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Palette Variations */
[data-palette="amethyst"] {
    --primary-h: 271;
    --primary-s: 91%;
    --primary-l: 65%;
}

[data-palette="emerald"] {
    --primary-h: 142;
    --primary-s: 71%;
    --primary-l: 45%;
}

[data-palette="amber"] {
    --primary-h: 38;
    --primary-s: 92%;
    --primary-l: 50%;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-base: #0b0f19;
    --bg-surface: #151c2c;
    --bg-surface-glass: rgba(21, 28, 44, 0.75);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-color: #222d44;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    transition: var(--transition);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Utility Layouts */
.glass-panel {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: 0 8px 40px 0 rgba(31, 38, 135, 0.12);
}

/* Main Dashboard Wrapper */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--primary);
}

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-item.active a, .menu-item a:hover {
    color: var(--primary);
    background: var(--primary-glow);
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid var(--border-glass);
}

.user-summary-info {
    flex-grow: 1;
    overflow: hidden;
}

.user-summary-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-summary-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Header & Content Styling */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.main-header {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

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

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

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

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

/* Forms and Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Card Grids */
.dashboard-grid {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media(max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive Content Wrapper */
.content-container {
    padding: 2.5rem;
}

/* Appointment list styles */
.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appointment-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-base);
    transition: var(--transition);
}

.appointment-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

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

.appointment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.appointment-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

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

.badge {
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-scheduled {
    background: var(--primary-glow);
    color: var(--primary);
}

.badge-completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Client Lists */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.client-card {
    text-align: center;
    padding: 2rem 1.5rem;
    cursor: pointer;
}

.client-card .avatar {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
    margin: 0 auto 1rem auto;
}

.client-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.client-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Authentication Page Styles */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-base) 0%, calc(var(--primary-glow) + #000) 100%);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 2.8rem;
}

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

.auth-header .logo-icon {
    margin: 0 auto 1rem auto;
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

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

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

/* Profile / Theme Customization Panel */
.theme-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.palette-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.palette-btn.active {
    border-color: var(--text-main);
    transform: scale(1.1);
}

.palette-btn.ocean { background: #3b82f6; }
.palette-btn.amethyst { background: #a855f7; }
.palette-btn.emerald { background: #10b981; }
.palette-btn.amber { background: #f59e0b; }

/* Call Interface Styles */
.call-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    height: 100vh;
    background: #090d16;
    color: #fff;
    overflow: hidden;
}

.call-main {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    justify-content: center;
    height: 100%;
}

/* Picture in Picture Video Layout */
.video-container-pip {
    position: relative;
    width: 100%;
    height: 100%;
    background: #070a13;
}

.remote-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: #070a13;
}

.remote-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-video-wrapper {
    position: absolute;
    bottom: 105px;
    right: 20px;
    width: 220px;
    height: 145px;
    z-index: 20;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.local-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media(max-width: 768px) {
    .local-video-wrapper {
        width: 110px;
        height: 155px;
        right: 15px;
        bottom: 110px;
    }
    
    .appointment-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .appointment-actions {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
}

.video-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10;
}

/* Online / Offline indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-dot.offline {
    background-color: #94a3b8;
}

.online-indicator {
    display: inline-flex;
    align-items: center;
}

.call-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.control-btn.btn-hangup {
    background: var(--danger);
}

.control-btn.btn-hangup:hover {
    background: #dc2626;
}

.control-btn.disabled {
    background: var(--danger);
}

/* Call Sidebar (Chat / Notes) */
.call-sidebar {
    background: #111827;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-tab {
    flex-grow: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.sidebar-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-content {
    flex-grow: 1;
    display: none;
    flex-direction: column;
    height: calc(100% - 50px);
    overflow: hidden;
}

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

/* Chat Tab inside Call */
.chat-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-bubble.sent {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-bubble.received {
    background: #1f2937;
    color: #f3f4f6;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    text-align: right;
}

.chat-input-area {
    padding: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #0b0f19;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex-grow: 1;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    outline: none;
}

.chat-input:focus {
    border-color: var(--primary);
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #1f2937;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-label:hover {
    background: #374151;
}

.file-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* Notes Tab (Doctor Only) */
.notes-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    gap: 15px;
}

.notes-textarea {
    flex-grow: 1;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 15px;
    border-radius: var(--radius-sm);
    resize: none;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.5;
}

.notes-textarea:focus {
    border-color: var(--primary);
}

.notes-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* AI Panel Styles */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 450px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}

.ai-header {
    background: var(--primary);
    color: var(--text-white);
    padding: 12px 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.4;
}

.ai-bubble.user {
    background: var(--primary-glow);
    color: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-bubble.assistant {
    background: var(--bg-base);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border-color);
}

.ai-input-area {
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background: var(--bg-surface);
}

/* Incoming Call Notification Banner */
.ringing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.ringing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.ringing-avatar {
    width: 90px;
    height: 90px;
    background: var(--primary);
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    border: 4px solid var(--border-color);
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: rotate(0); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0); }
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--glass-shadow);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateY(100px);
    opacity: 0;
    animation: slideIn 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- MOBILE & TABLET RESPONSIVENESS MEDIA QUERIES --- */
/* 1. Mobile Portrait (Dik Tasarım) */
@media (max-width: 900px) and (orientation: portrait) {
    .call-container {
        grid-template-columns: 1fr;
        grid-template-rows: 52vh 48vh; /* Expanded video downwards, sidebar takes remaining */
        height: 100vh;
        overflow: hidden;
    }
    
    .call-main {
        padding: 8px;
        height: 100%;
        position: relative;
    }
    
    .video-container-pip {
        display: block; /* Disable grid for absolute layering */
        position: relative;
        height: 100%;
        width: 100%;
        padding: 0;
    }
    
    /* Remote Video (Fullscreen Background) */
    .remote-video-wrapper {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
        border-radius: var(--radius-md);
        overflow: hidden;
    }
    
    /* Local Video (Floating in top-right corner) */
    .local-video-wrapper {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        bottom: auto !important;
        left: auto !important;
        width: 90px !important;
        height: 125px !important;
        z-index: 10 !important;
        border-radius: var(--radius-sm) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
        overflow: hidden;
    }
    
    /* Small label adjustments in floating local window */
    .local-video-wrapper .video-label {
        font-size: 0.65rem;
        bottom: 5px;
        left: 5px;
        padding: 2px 4px;
    }
    
    .call-sidebar {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .call-controls {
        bottom: 10px;
        padding: 6px 12px;
        gap: 8px;
    }
    
    .control-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .chat-messages {
        padding: 12px;
        gap: 10px;
    }
    
    .chat-input-area {
        padding: 8px;
    }
    
    .notes-container {
        padding: 12px;
        gap: 10px;
    }
}

/* 2. Mobile Landscape (Yan Tasarım) */
@media (max-width: 900px) and (orientation: landscape) {
    .call-container {
        grid-template-columns: 1fr 300px; /* Video left, Sidebar right */
        grid-template-rows: 1fr;
        height: 100vh;
        overflow: hidden;
    }
    
    .call-main {
        padding: 8px;
        height: 100%;
        position: relative;
    }
    
    .video-container-pip {
        display: grid;
        padding: 5px;
        gap: 8px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        height: 100%;
        position: relative;
    }
    
    .remote-video-wrapper, .local-video-wrapper {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        right: auto !important;
        border-radius: var(--radius-sm);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }
    
    .call-sidebar {
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        height: 100%;
        width: 300px;
        display: flex;
        flex-direction: column;
    }
    
    .call-controls {
        bottom: 10px;
        padding: 6px 12px;
        gap: 8px;
    }
    
    .control-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .chat-messages {
        padding: 12px;
        gap: 10px;
    }
    
    .chat-input-area {
        padding: 8px;
    }
    
    .notes-container {
        padding: 12px;
        gap: 10px;
    }
}

@media (max-width: 1024px) {
    .content-container {
        padding: 1.5rem;
    }

    /* App Container Layout Stack */
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        display: flex;
        flex-direction: column;
    }
     /* Sidebar as top navigation row on mobile */
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 12px 10px 8px 10px; /* Compact padding */
        flex-direction: column; /* Stack logo and menu list */
        align-items: center;
        justify-content: center;
        gap: 12px; /* Space below the logo */
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--bg-surface-glass);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        overflow: hidden;
    }
    
    .logo-area {
        margin-bottom: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .menu-list {
        display: flex; /* Flex row layout */
        flex-direction: row;
        justify-content: space-around; /* Distribute items evenly */
        width: 100%;
        gap: 0;
        flex-wrap: nowrap; /* No wrapping */
        overflow-x: hidden; /* Prevent horizontal scrolling entirely */
        overflow-y: hidden; /* Prevent vertical scrolling */
        padding: 0;
        margin: 0;
    }
    
    .menu-item {
        flex: 1; /* Each takes equal space */
        text-align: center;
        display: block;
    }
    
    .menu-item a {
        display: flex;
        flex-direction: column; /* Icon on top, Text on bottom */
        align-items: center;
        justify-content: center;
        gap: 4px; /* Space between icon and label */
        padding: 8px 2px;
        font-size: 0.72rem; /* Compact font size to fit width */
        color: var(--text-muted);
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        transition: var(--transition);
        width: 100%;
    }

    .menu-item.active a, .menu-item a:hover {
        color: var(--primary) !important; /* Active item glows with theme color */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .menu-item a i {
        font-size: 1.15rem; /* Larger icon */
        margin-bottom: 2px;
        transition: var(--transition);
    }
    
    .menu-item.active a i {
        transform: translateY(-2px); /* Active micro-animation */
    }
    
    .user-profile-summary {
        display: none; /* Hide summary inside sidebar to save space */
    }
    
    /* Main Content Adjustments */
    .main-content {
        height: auto;
        overflow-y: visible;
    }
    
    .main-header {
        padding: 1.2rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    /* Grid Adjustments */
    .dashboard-grid {
        padding: 1.5rem;
        gap: 1.5rem;
        grid-template-columns: 1fr !important; /* Stack both columns */
    }
    
    .client-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .card {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    /* Ringing screen */
    .ringing-card {
        padding: 2rem 1.5rem;
    }
    
    .ringing-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 1rem;
    }

    .sidebar {
        padding: 10px 8px 6px 8px; /* Extra compact header padding */
        gap: 8px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 1.1rem;
    }
    
    .menu-item a {
        padding: 6px 2px; /* Very compact padding on narrow mobiles */
        font-size: 0.65rem; /* Shrink text slightly to guarantee fit */
    }
    
    .menu-item a i {
        font-size: 1.05rem; /* Shrink icon slightly */
    }
    
    .menu-item a span {
        display: block !important; /* Guarantee label displays block below icon */
    }
    
    .main-header {
        padding: 1rem 1.2rem;
    }
    
    .main-header h1 {
        font-size: 1.25rem;
    }
    
    .dashboard-grid {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.8rem 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.4rem;
    }
}
