/* =========================
   GLOBAL
========================= */
* {
    box-sizing: border-box;
    direction: rtl;
}

body {
    margin: 0;
    background: #f4f6f9;
    font-family: Arial, sans-serif;
    color: #333;
}

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

.login-wrapper{
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(135deg,#3f6edb,#5c8df6);
}

.login-card{
    width:380px;
    background:white;
    border-radius:16px;
    padding:35px;
    box-shadow:0 20px 40px rgba(0,0,0,0.15);
    display:flex;
    flex-direction:column;
    gap:20px;
}

.login-title{
    text-align:center;
    font-size:22px;
    font-weight:600;
}

.input-group{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.input-group label{
    font-size:13px;
    color:#666;
}

.input-group input{
    padding:12px 14px;
    border-radius:8px;
    border:1px solid #ddd;
    font-size:14px;
    transition:0.2s ease;
}

.input-group input:focus{
    border-color:#3f6edb;
    outline:none;
    box-shadow:0 0 0 3px rgba(63,110,219,0.15);
}

.login-btn{
    margin-top:10px;
    padding:12px;
    border:none;
    border-radius:8px;
    background:#3f6edb;
    color:white;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:0.2s ease;
}

.login-btn:hover{
    background:#2f55b5;
}

.error-box{
    background:#ffe5e5;
    color:#d32f2f;
    padding:10px;
    border-radius:8px;
    font-size:13px;
    text-align:center;
}


/* =========================
   LAYOUT
========================= */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #1f2d3d;
    color: white;
    padding: 20px;
}

.content {
    flex-grow: 1;
    padding: 30px;
}

/* =========================
   FLEX GRID
========================= */
.flex-wrap,
.patients-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* =========================
   CARDS
========================= */
.metric-card,
.patient-card {
    flex: 1 1 320px;
    background: white;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===============================
   FORM CARD for patient
=============================== */

.form-card{
    max-width: 750px;
    margin: 0 auto;
    background:white;
    padding:40px;
    border-radius:18px;
    box-shadow:0 8px 30px rgba(0,0,0,0.06);
}

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

.form-header h2{
    margin:0;
    font-size:22px;
    font-weight:600;
}

/* ===============================
   MODERN FORM
=============================== */

.modern-form{
    display:flex;
    flex-direction:column;
    gap:25px;
}

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

.form-group{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.form-group label{
    font-size:13px;
    color:#666;
    font-weight:500;
}

.form-group input,
.form-group select{
    padding:12px 14px;
    border-radius:10px;
    border:1px solid #ddd;
    font-size:14px;
    transition:0.2s ease;
    background:#fafafa;
}

.form-group input:focus,
.form-group select:focus{
    border-color:#3f6edb;
    outline:none;
    background:white;
    box-shadow:0 0 0 3px rgba(63,110,219,0.1);
}

.form-actions{
    display:flex;
    justify-content:flex-start;
}

.form-error{
    background:#ffebee;
    color:#c62828;
    padding:12px;
    border-radius:8px;
    margin-bottom:20px;
    font-size:14px;
}


/* =========================
   AUTH
========================= */
.auth-box {
    max-width: 400px;
    margin: 120px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

/* =========================
   FORMS
========================= */
.patient-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.patient-form input,
.patient-form select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* =========================
   BUTTONS
========================= */
button {
    cursor: pointer;
    border: none;
    transition: 0.2s ease;
}

.btn-primary {
    background: #2e7d32;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
}

.btn-primary:hover {
    background: #256a2b;
}

.btn-secondary {
    background: #7e57c2;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
}

.btn-secondary:hover {
    opacity: 0.9;
}

/* =========================
   RECORDER
========================= */
.recorder-container {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recorder-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.timer {
    font-size: 20px;
    font-weight: 600;
    color: #444;
    width: 50px;
    text-align: center;
}

.btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-button-group{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
}

.record-label{
    font-size:16px;
    font-weight:600;
    color:#333;
}

.btn-record {
    background: #e53935;
    color: white;
}

.btn-record:hover {
    background: #d32f2f;
}

.btn-stop {
    background: #9e9e9e;
    color: white;
}

.btn-stop:hover {
    background: #757575;
}

/* =========================
   TIMER BOX NEW STYLE
========================= */

.timer-box{
    width: 60px;              /* כמו הכפתורים */
    height: 60px;
    border-radius: 12px;
    border: 2px solid #6bbf59;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:16px;
    font-weight:600;
    background:white;
}



/* =========================
   UPLOAD
========================= */
.upload-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.file-label {
    background: #f1f3f6;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
}

.file-label input {
    display: none;
}

/* =========================
   RESULTS
========================= */
.result-box {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fb;
    border-radius: 10px;
    font-size: 14px;
}

/* =========================
   STATUS
========================= */
.record-status {
    font-weight: 500;
    color: #555;
}

.recording {
    color: #e53935;
}

/* =========================
   AUDIO
========================= */
.audio-preview {
    width: 100%;
}

/* =========================
   PROGRESS BAR (אם תרצה להשתמש)
========================= */
.progress-wrapper {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #e53935, #ff7043);
    transition: width 0.1s linear;
}

/* =========================
   RECORD INDICATOR
========================= */
.record-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
}

.record-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
}

.recording .dot {
    background: #e53935;
    animation: pulse 1s infinite;
}

.home-container{
    height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    gap:25px;
}

.home-buttons{
    display:flex;
    gap:25px;
}

.home-btn{
    padding:14px 40px;
    background:#3f6edb;
    color:white;
    text-decoration:none;
    border-radius:10px;
    font-size:18px;
    font-weight:600;
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
    transition:0.2s ease;
}

.home-btn:hover{
    background:#2f55b5;
    transform:translateY(-2px);
}
.dashboard-wrapper{
    height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:40px;
    background:#f4f6f9;
}

.dashboard-buttons{
    display:flex;
    gap:40px;
}

.dashboard-card{
    width:220px;
    height:160px;
    background:white;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-decoration:none;
    color:#333;
    font-size:20px;
    font-weight:600;
    box-shadow:0 6px 20px rgba(0,0,0,0.08);
    transition:0.25s ease;
}

.dashboard-card span{
    margin-top:10px;
}

.dashboard-card:hover{
    transform:translateY(-6px);
    box-shadow:0 10px 30px rgba(0,0,0,0.12);
}

.table-modern {
    width:100%;
    border-collapse:collapse;
    background:white;
    border-radius:12px;
    overflow:hidden;
}

.table-modern th,
.table-modern td {
    padding:14px;
    border-bottom:1px solid #eee;
    text-align:right;
}

.table-modern th {
    background:#f8f9fb;
    font-weight:600;
}

/* ===============================
   PAGE LAYOUT
=============================== */

.page-wrapper{
    padding:40px;
    background:#f4f6f9;
    min-height:100vh;
    direction:rtl;
}

.page-header{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:20px;
}

/* ===============================
   TABLE STYLE
=============================== */

.table-container{
    background:white;
    border-radius:14px;
    box-shadow:0 6px 20px rgba(0,0,0,0.05);
    overflow:hidden;
}

.table-modern-rtl{
    width:100%;
    border-collapse:collapse;
    text-align:right;
}

.table-modern-rtl thead{
    background:#f8f9fb;
}

.table-modern-rtl th{
    padding:16px;
    font-weight:600;
    font-size:14px;
    color:#555;
    border-bottom:1px solid #eee;
}

.table-modern-rtl td{
    padding:16px;
    border-bottom:1px solid #f1f1f1;
    font-size:14px;
    color:#333;
}

.table-modern-rtl tbody tr{
    transition:0.2s ease;
}

.table-modern-rtl tbody tr:hover{
    background:#f9fbff;
}

.empty-row{
    text-align:center;
    padding:30px;
    color:#888;
}

/* ===============================
   BUTTONS
=============================== */

.btn-primary{
    background:#3f6edb;
    color:white;
    padding:10px 18px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
    font-weight:600;
    transition:0.2s ease;
}

.btn-primary:hover{
    background:#2f55b5;
}

.btn-secondary-small{
    background:#7e57c2;
    color:white;
    padding:6px 12px;
    border-radius:6px;
    text-decoration:none;
    font-size:13px;
    transition:0.2s ease;
}

.btn-secondary-small:hover{
    background:#673ab7;
}

.analysis-section {
    margin-top: 15px;
    padding: 12px;
    background: #eef3ff;
    border-radius: 10px;
}

.analysis-section ul {
    margin: 0;
    padding-right: 18px;
}

.summary-box {
    margin-top: 15px;
    padding: 14px;
    background: #f4f6f9;
    border-radius: 10px;
    font-weight: 500;
}

.metrics-list p{
    margin: 4px 0;   /* רווח קטן ואחיד */
}

.metrics-list hr{
    margin: 10px 0;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {

    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .patients-grid {
        flex-direction: column;
    }
}
