/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f2f6f7;
    color: #333;
    font-size: 14px;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #dbeaea;
    display: flex;
    flex-direction: column;
    position: relative;
    border-right: 1px solid #c8dcdc;
    flex-shrink: 0;
}

.logo-container {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 22px;
    object-fit: cover;
    object-position: top;
}

.logo-text {
    display: flex;
    flex-direction: column;
    width: 140px;
}

.logo-title {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    color: #79B5BC;
    letter-spacing: 0;
}

.logo-subtitle {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #79B5BC;
    letter-spacing: 0;
    margin-top: 2px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding-top: 16px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    font-weight: 500;
}

.menu-item i:not(.dropdown-icon) {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 16px;
    color: #333;
}

.menu-item:hover {
    background-color: rgba(0,0,0,0.04);
}

.menu-item-parent {
    position: relative;
}

.dropdown-icon {
    position: absolute;
    right: 24px;
    font-size: 12px;
}

.submenu {
    display: flex;
    flex-direction: column;
}

.submenu-item {
    padding: 12px 24px 12px 60px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
}

.submenu-item.active {
    background-color: #314e52;
    color: #fff;
}

.submenu-item:hover:not(.active) {
    background-color: rgba(0,0,0,0.04);
}

.collapse-btn {
    position: absolute;
    right: -10px;
    top: 70px;
    color: #314e52;
    background-color: #f2f6f7;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: #f2f6f7;
    position: relative;
}

/* Header */
.header {
    height: 80px;
    background-color: #f2f6f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    border-bottom: 1px solid #e0e6e7;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.breadcrumb {
    font-size: 13px;
    color: #999;
}

.breadcrumb span {
    color: #79B5BC;
}

.page-title {
    font-size: 24px;
    color: #79B5BC;
    font-weight: 500;
}

.profile-icon {
    width: 36px;
    height: 36px;
    background-color: #79B5BC;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* Content Body */
.content-body {
    padding: 0 32px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #84c0c7;
    margin-bottom: 0;
    margin-top: 16px;
}

.tab {
    padding: 10px 24px;
    font-size: 15px;
    color: #79B5BC;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

/* Card */
.card {
    background: #fff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e5e5;
    border-top: none;
}

.card-header {
    padding: 24px 32px;
    display: flex;
    justify-content: flex-end;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.search-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: white;
    padding: 0 4px;
    font-size: 11px;
    color: #666;
    z-index: 1;
}

.search-input-container {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px 8px 36px;
    width: 280px;
}

.search-input-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.search-input-container input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #333;
}

/* Table */
.table-responsive {
    flex: 1;
    overflow-x: auto;
    padding: 0 32px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 16px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table th {
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid #f0f0f0;
}

.data-table th i {
    color: #999;
    margin-left: 6px;
}

.data-table tbody tr:hover {
    background-color: #fafafa;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid rgba(46, 204, 113, 0.5);
    background-color: #fff;
    box-sizing: border-box;
}

.status-active {
    color: #2ECC71;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: none;
    border-radius: 4px;
    padding: 0 16px;
    cursor: pointer;
    font-size: 13px;
    transition: opacity 0.2s;
    box-sizing: border-box;
}

.btn:hover {
    opacity: 0.9;
}

.btn-edit {
    background-color: #79B5BC;
    color: white;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    color: #666;
    font-size: 13px;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-wrapper {
    position: relative;
    border-bottom: 1px solid #ccc;
    padding-bottom: 2px;
}

.page-size-select {
    border: none;
    outline: none;
    cursor: pointer;
    color: #333;
    appearance: none;
    padding-right: 16px;
    background: transparent;
    font-size: 13px;
}

.select-wrapper::after {
    content: '\25BC';
    font-size: 8px;
    color: #666;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.page-info {
    margin-left: 12px;
}

.pagination-right {
    display: flex;
    gap: 4px;
    align-items: center;
}

.page-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #bbb;
}

.page-btn:hover:not(.active) {
    background-color: #f5f5f5;
    color: #666;
}

.page-btn.active {
    background-color: #7ebaba;
    color: white;
}

/* Edit Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background-color: #fff;
    width: 700px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 32px 32px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #79B5BC;
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    padding: 16px 32px 32px;
}

.section-title {
    color: #79B5BC;
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.form-field {
    position: relative;
    flex: 1;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
    outline: none;
    box-sizing: border-box;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    cursor: pointer;
}

.form-field input:focus,
.form-field select:focus {
    border-color: #79B5BC;
}

.form-field label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #fff;
    padding: 0 4px;
    font-size: 12px;
    color: #666;
}

.required-star {
    color: #d32f2f;
}

.modal-footer {
    padding: 0 32px 32px;
    display: flex;
    justify-content: flex-end;
}

.btn-confirm {
    background-color: #79B5BC;
    color: white;
    font-size: 14px;
    padding: 0 24px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.mt-4 {
    margin-top: 32px;
}

.align-center {
    align-items: center;
}

.flex-2 {
    flex: 2;
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 8px; /* space for label */
}

.toggle-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #fff;
    padding: 0 4px;
    font-size: 12px;
    color: #666;
    z-index: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: 12px; /* align with input padding */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #79B5BC;
}

input:focus + .slider {
    box-shadow: 0 0 1px #79B5BC;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 40px; /* space for the eye icon */
}

.password-toggle {
    position: absolute;
    right: 12px;
    color: #999;
    cursor: pointer;
    font-size: 16px;
}

.password-toggle:hover {
    color: #666;
}