/* ===== Salon Manager - Frontend CSS ===== */

/* Reset & Base */
.sm-entry-wrap,
.sm-report-wrap {
    max-width: 700px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sm-entry-card,
.sm-report-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.sm-entry-header,
.sm-report-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 25px 30px;
}
.sm-entry-header h2,
.sm-report-header h2 {
    margin: 0 0 5px;
    font-size: 22px;
    font-weight: 700;
    color : white;
}
.sm-entry-header p,
.sm-report-header p {
    margin: 0;
    opacity: 0.75;
    font-size: 14px;
}

/* Form */
.sm-form {
    padding: 25px 30px 30px;
}
.sm-field {
    margin-bottom: 22px;
}
.sm-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}
.sm-req { color: #e74c3c; }

.sm-field select,
.sm-field input[type="text"],
.sm-field input[type="number"],
.sm-field input[type="email"],
.sm-field input[type="date"],
.sm-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fafafa;
}
.sm-field select:focus,
.sm-field input:focus,
.sm-field textarea:focus {
    border-color: #3498db;
    outline: none;
    background: #fff;
}

.sm-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

/* Autocomplete */
.sm-autocomplete-wrap {
    position: relative;
}
.sm-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #3498db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.sm-suggestions.active {
    display: block;
}
.sm-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: background 0.15s;
}
.sm-suggestion-item:hover {
    background: #ebf5fb;
}
.sm-suggestion-item:last-child {
    border-bottom: none;
}
.sm-suggestion-phone {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

.sm-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ebf5fb;
    border: 1px solid #3498db;
    border-radius: 20px;
    padding: 6px 14px;
    margin-top: 8px;
    font-size: 14px;
    color: #2980b9;
    font-weight: 600;
}
.sm-tag-remove {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #e74c3c;
    padding: 0;
    line-height: 1;
}

.sm-link-btn {
    background: none;
    border: none;
    color: #3498db;
    font-size: 13px;
    cursor: pointer;
    padding: 5px 0;
    text-decoration: underline;
}
.sm-link-btn:hover { color: #2980b9; }

.sm-inline-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.sm-inline-form input {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

/* Checkbox Grid */
.sm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.sm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: normal !important;
}
.sm-checkbox-label:hover {
    border-color: #3498db;
    background: #ebf5fb;
}
.sm-checkbox-label input:checked + .sm-checkbox-text {
    color: #2980b9;
    font-weight: 600;
}
.sm-checkbox-label input {
    accent-color: #3498db;
    width: 18px;
    height: 18px;
}
.sm-checkbox-text {
    flex: 1;
    font-size: 14px;
}
.sm-checkbox-price {
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

/* Buttons */
.sm-btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    width: 100%;
}
.sm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}
.sm-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.sm-btn-secondary {
    background: #e9ecef;
    color: #333;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.sm-btn-secondary:hover { background: #dee2e6; }

.sm-btn-small {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.sm-btn-small:hover { background: #2980b9; }
.sm-btn-small.sm-btn-secondary {
    background: #e9ecef;
    color: #333;
}

/* Message */
.sm-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.sm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.sm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== Report Page ===== */
.sm-report-card {
    max-width: 100%;
}
.sm-report-wrap {
    max-width: 960px;
}

.sm-filters {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}
.sm-filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.sm-filter-row:last-child { margin-bottom: 0; }

.sm-filter-field {
    flex: 1;
    min-width: 150px;
}
.sm-filter-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}
.sm-filter-field select,
.sm-filter-field input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}
.sm-filter-field select:focus,
.sm-filter-field input:focus {
    border-color: #3498db;
    outline: none;
}
.sm-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

/* Summary Cards */
.sm-summary {
    display: flex;
    gap: 20px;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}
.sm-summary-item {
    flex: 1;
    background: #f0f6fc;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
}
.sm-summary-total {
    background: #d4edda !important;
}
.sm-summary-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}
.sm-summary-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #1a1a2e;
}
.sm-summary-total .sm-summary-value {
    color: #155724;
}

/* Results Table */
.sm-results {
    padding: 20px 30px 30px;
    overflow-x: auto;
}
.sm-placeholder {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 15px;
}

.sm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.sm-table thead th {
    background: #1a1a2e;
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.sm-table thead th:first-child { border-radius: 8px 0 0 0; }
.sm-table thead th:last-child { border-radius: 0 8px 0 0; }

.sm-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #eee;
}
.sm-table tbody tr:hover {
    background: #f8f9fa;
}
.sm-table tbody tr:last-child td {
    border-bottom: none;
}
.sm-table .sm-price {
    font-weight: 700;
    color: #27ae60;
}
.sm-table tfoot td {
    padding: 14px;
    font-weight: 800;
    background: #d4edda;
    font-size: 16px;
}
.sm-table tfoot td:first-child { border-radius: 0 0 0 8px; }
.sm-table tfoot td:last-child { border-radius: 0 0 8px 0; }

/* Loading Spinner */
.sm-loading {
    text-align: center;
    padding: 30px;
}
.sm-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: sm-spin 0.7s linear infinite;
}
@keyframes sm-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .sm-entry-wrap,
    .sm-report-wrap { padding: 0 10px; }
    .sm-form,
    .sm-filters,
    .sm-results { padding: 15px; }
    .sm-checkbox-grid { grid-template-columns: 1fr; }
    .sm-filter-row { flex-direction: column; }
    .sm-summary { flex-direction: column; gap: 10px; }
    .sm-filter-actions { flex-wrap: wrap; }
}
