/* Admin Booking System CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: linear-gradient(135deg, #4b734a 0%, #4b734a 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header h1 {
    flex: 1;
    text-align: left;
    font-size: 1.5rem;
    margin: 0;
    white-space: nowrap;
    font-weight: 600;
}

.nav {
    padding: 0.5rem 0;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin-right: 1rem;
    background: transparent;
    border: none;
    outline: none;
    padding: 5px;
    position: relative;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

.hamburger span {
    height: 3px;
    width: 20px;
    background: white;
    margin: 2px 0;
    border-radius: 2px;
    display: block;
    transition: all 0.3s ease;
}

/* Login Background */
.login-background {
    min-height: 100vh;
    background: linear-gradient(135deg, #4b734a 0%, #C1E1C1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Form */
.login-container {
    max-width: 400px;
    width: 100%;
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #333;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.login-form {
    margin-top: 1.5rem;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #4b734a 0%, #355a36 100%);
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, #355a36 0%, #2d4a2e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 115, 74, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    background: linear-gradient(135deg, #4b734a 0%, #4b734a 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    background: #355a36;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.btn-success {
    background: #4b734a !important;
    color: #fff !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fcc419 100%);
    color: #333;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-header {
    background: linear-gradient(135deg, #4b734a 0%, #4b734a 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
    font-size: 1rem;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row.full {
    grid-template-columns: 1fr;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    table {
        font-size: 0.95rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.95rem;
    }
}

/* Status Labels */
.status-label {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    display: inline-block;
    letter-spacing: 0.5px;
}
.status-pending {
    background: #ffc107;
    color: #856404;
}
.status-confirmed {
    background: #28a745;
    color: #fff;
}
.status-completed {
    background: #007bff;
    color: #fff;
}
.status-cancelled {
    background: #dc3545;
    color: #fff;
}
.status-rescheduled {
    background: #17a2b8;
    color: #fff;
}
.status-no_show {
    background: #343a40;
    color: #fff;
}
.status-rejected {
    background: #721c24;
    color: #fff;
}

/* Status Container and Dropdown */
.status-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.status-dropdown {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
}

.status-dropdown:focus {
    outline: none;
    border-color: #4b734a;
    box-shadow: 0 0 0 2px rgba(75, 115, 74, 0.2);
}

.status-dropdown option {
    padding: 0.5rem;
}

/* Responsive Status */
@media (max-width: 768px) {
    .status-container {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
    }
    
    .status-dropdown {
        min-width: 100px;
        font-size: 0.75rem;
    }
}

/* Pagination */
.pagination .btn-success {
    background: #4b734a !important;
    color: #fff !important;
    border: 2px solid #4b734a;
}

.pagination .btn {
    margin: 0 2px;
    min-width: 40px;
}

/* Responsive Booking List Table & Header */
@media (max-width: 900px) {
    .container {
        padding: 10px;
    }
    .form-container, .table-container {
        padding: 1rem;
    }
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 700px) {
    .header {
        width: 100vw !important;
        left: 0;
        margin: 0 !important;
        padding: 1rem 2rem !important;
        border-radius: 0 !important;
        min-width: 0 !important;
        box-sizing: border-box;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .table-header {
        width: 100% !important;
        left: 0;
        margin: 0 !important;
        padding: 1rem !important;
        border-radius: 0 !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-container, .table-container {
        padding: 0.5rem;
    }
    .header h1 {
        font-size: 1.1rem;
        margin: 0;
        flex: 1;
    }
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        display: none;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        border: 1px solid rgba(75, 115, 74, 0.2);
    }
    .nav.active {
        display: block !important;
    }
    .nav ul {
        display: block;
        flex-direction: column;
        background: transparent;
        position: static;
        width: 100%;
        z-index: auto;
        padding: 1rem 0;
        margin: 0;
    }
    .nav ul li {
        border-bottom: 1px solid rgba(75, 115, 74, 0.1);
    }
    .nav ul li:last-child {
        border-bottom: none;
    }
    .nav a {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
        color: #4b734a;
        font-weight: 600;
        transition: background-color 0.3s;
    }
    
    .nav a:hover {
        background-color: rgba(75, 115, 74, 0.1);
        color: #355a36;
    }
    .nav ul.active {
        display: block;
    }
    
    .statistics {
        grid-template-columns: 1fr;
    }
    .container, .table-container, .form-container {
        padding: 1rem;
        margin: 0.5rem;
    }
}

@media (max-width: 600px) {
    .table-container {
        overflow-x: auto;
    }
    table {
        min-width: 600px;
        font-size: 0.9rem;
    }
    th, td {
        padding: 0.6rem 0.4rem;
        font-size: 0.9rem;
    }
    .pagination .btn {
        min-width: 30px;
        font-size: 0.9rem;
        padding: 0.5rem 0.7rem;
    }
    .form-container {
        padding: 0.5rem;
    }
}

@media (max-width: 400px) {
    .header h1 {
        font-size: 0.9rem;
    }
    .table-header h2 {
        font-size: 1rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
    }
    
    .login-background {
        padding: 10px;
    }
    
    .login-container {
        padding: 1.5rem;
        margin: 10px;
        max-width: 100%;
        width: calc(100% - 20px);
    }
    
    .login-header h2 {
        font-size: 16px;
    }
    
    .form-group input {
        font-size: 16px; /* ป้องกัน zoom บน iOS */
        padding: 12px;
    }
    
    .btn-login {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* Make table scrollable horizontally on small screens */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-responsive table {
    min-width: 700px;
}

/* Hamburger menu styles - Removed duplicate */

/* Removed duplicate media query - hamburger functionality is handled in the main @media (max-width: 700px) above */

.container, .table-container, .form-container {
    box-sizing: border-box;
} 

/* --- Modernized Therapists Management Styles --- */

.form-container {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    margin-bottom: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.form-row.full {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
}

.form-group label {
    font-weight: 600;
    color: #355a36;
    margin-bottom: 0.5rem;
    display: block;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    background: #f8fafb;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(60,60,60,0.04);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #4b734a;
    outline: none;
    box-shadow: 0 0 0 2px #b7e4c7;
}
.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.btn, .btn-success, .btn-warning, .btn-danger {
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 2px 8px rgba(60,60,60,0.06);
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn-warning:hover { background: #ffe066; color: #222; }
.btn-danger:hover { background: #ff6b6b; color: #fff; }
.btn-success:hover { background: #355a36; color: #fff; }

/* Avatar Image in Table */
.therapist-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: #f8fafb;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.3em 1em;
    border-radius: 12px;
    font-size: 0.98em;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 0.2em;
}
.status-active { background: #51cf66; color: #fff; }
.status-inactive { background: #adb5bd; color: #fff; }

/* Table Modern Look */
.table-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    overflow: hidden;
    margin-bottom: 2.5rem;
}
.table-header {
    background: linear-gradient(135deg, #4b734a 0%, #4b734a 100%);
    color: white;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    font-size: 1.05rem;
}
th, td {
    padding: 1.1rem 1rem;
    text-align: left;
    vertical-align: middle;
    border: none;
    background: #fff;
}
tr {
    border-bottom: 1px solid #e1e5e9;
    transition: background 0.2s;
}
tr:last-child {
    border-bottom: none;
}
tr:hover {
    background-color: #f1f3f5;
}
thead th:first-child {
    border-top-left-radius: 12px;
}
thead th:last-child {
    border-top-right-radius: 12px;
}
tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}
tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* จำกัดความยาว description ใน td (รองรับ browser ทันสมัย) */
/*
td:nth-child(3) {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 6.5em;
    white-space: normal;
}
*/
th {
    background-color: #f8f9fa;
    font-weight: 700;
    color: #355a36;
    letter-spacing: 0.5px;
}
tr:hover {
    background-color: #f1f3f5;
    transition: background 0.2s;
}

/* Responsive for Form/Table */
@media (max-width: 900px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-container, .table-container {
        padding: 1rem;
    }
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
@media (max-width: 600px) {
    .form-container, .table-container {
        padding: 0.5rem;
    }
    th, td {
        padding: 0.6rem 0.4rem;
        font-size: 0.9rem;
    }
    .therapist-avatar {
        width: 75px;
        height: 80px;
    }
} 

/* ปรับปุ่ม Edit/Delete ในตาราง Therapists List ให้อยู่กึ่งกลางแถวและดูสวยงาม */
.action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    height: 100%;
    margin-top: 1.5rem;
}
.action-buttons .btn {
    min-width: 90px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.08);
    margin: 0.1rem 0;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.15s;
}
.action-buttons .btn-warning:hover {
    background: #ffe066;
    color: #222;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(255,208,102,0.18);
}
.action-buttons .btn-danger:hover {
    background: #ff6b6b;
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(255,107,107,0.18);
}

/* ปรับให้ปุ่มอยู่ตรงกลางแนวตั้งของเซลล์ */
td.action-buttons {
    vertical-align: middle !important;
} 

/* ปุ่มไอคอน Edit/Delete ในตาราง Therapists List */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, color 0.18s, transform 0.15s;
    margin: 0.1rem 0;
    box-shadow: 0 1px 4px rgba(60,60,60,0.06);
}
.icon-btn span {
    pointer-events: none;
}
.icon-edit {
    color: #ffd43b;
    background: #fffbe6;
}
.icon-edit:hover {
    background: #ffe066;
    color: #bfa100;
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(255,208,102,0.18);
}
.icon-delete {
    color: #ff6b6b;
    background: #fff0f0;
}
.icon-delete:hover {
    background: #ff6b6b;
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(255,107,107,0.18);
} 

@media (max-width: 600px) {
    .form-row.full {
        flex-direction: column;
        gap: 0.7rem;
        align-items: stretch;
    }
    .form-row.full .btn {
        width: 100% !important;
        min-width: 0;
        font-size: 1.05rem;
    }
    .btn-danger {
        width: 100% !important;
        margin-top: 0.7rem;
        margin-left: 0 !important;
        font-size: 1.05rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(255,107,107,0.10);
        padding: 0.7rem 1.5rem;
    }
    .action-buttons {
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0 !important;
        height: 100%;
    }
    td.action-buttons {
        vertical-align: middle !important;
    }
} 

/* ยกเลิก responsive card table ให้แสดงตารางแนวนอนเหมือนเดิมทุกขนาดหน้าจอ */
/*
@media (max-width: 700px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    background: #fff;
    padding: 1rem 0.5rem;
    border: 1px solid #e1e5e9;
  }
  td {
    border: none;
    position: relative;
    padding-left: 48%;
    min-height: 2.5em;
    text-align: left;
    background: none;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
  }
  td:before {
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 45%;
    white-space: nowrap;
    font-weight: bold;
    color: #355a36;
    content: attr(data-label);
    font-size: 0.98em;
  }
  .action-buttons {
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .therapist-avatar {
    width: 64px;
    height: 64px;
    margin-top: 0.5rem;
  }
}
*/ 

/* Pagination Modern Look */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 0.5rem 0;
}
.pagination .btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.9rem;
    font-size: 1rem;
    border-radius: 8px;
    background: #4b734a;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(60,60,60,0.08);
    margin: 0 2px;
    border: none;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pagination .btn.active, .pagination .btn:active {
    background: #355a36;
    color: #fff;
    box-shadow: 0 2px 8px rgba(60,60,60,0.12);
}
.pagination .btn:hover {
    background: #355a36;
    color: #fff;
}
.pagination .ellipsis {
    color: #4b734a;
    font-size: 1.2rem;
    padding: 0 8px;
    user-select: none;
    pointer-events: none;
    font-weight: bold;
}
@media (max-width: 600px) {
    .pagination {
        gap: 0.15rem;
    }
    .pagination .btn {
        min-width: 28px;
        height: 32px;
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }
} 