/* Basic Reset & Modern Body Style */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7fa; /* Mas malinis na light grayish-blue */
    margin: 0;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Header with Gradient */
header {
    background: linear-gradient(135deg, #0056b3, #007bff);
    color: white;
    padding: 20px 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
}

.brand .subtitle {
    font-size: 13px;
    color: #d1e7ff;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info button {
    margin-left: 15px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.viewer-btn {
    background: transparent;
    color: white;
}

.viewer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.logout-btn {
    background-color: white;
    color: #0056b3;
    border-color: white;
}

.logout-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* Tabs Navigation - Modernized */
.tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 25px;
    gap: 10px;
}

.tab-link {
    padding: 12px 25px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-link:hover {
    color: #0056b3;
}

.tab-link.active {
    color: #0056b3;
    border-bottom: 3px solid #007bff;
}

/* Tab Content Styling */
.tab-content { display: none; }
.tab-content.active {
    display: block; 
    animation: fadeIn 0.4s ease; /* Fade-in effect kapag nagpapalit ng tab */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Styling with Soft Shadows */
.form-container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); /* Mas malambot na shadow */
}

.form-row {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-group.full-width { flex-basis: 100%; }

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #495057;
}

/* Inputs & Textareas - Highlight on Type */
.form-group input, textarea.full-width, .data-table td input {
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    background-color: #fcfcfc;
    transition: all 0.3s ease;
}

.form-group input:focus, textarea.full-width:focus, .data-table td input:focus {
    border-color: #80bdff;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15); /* Blue glow effect */
    outline: none;
}

textarea.full-width {
    width: 100%;
    box-sizing: border-box;
}

/* Section Titles */
.section-title {
    margin-top: 35px;
    margin-bottom: 20px;
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

/* Form Actions / Buttons */
.form-actions {
    display: flex;
    justify-content: flex-end; 
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.save-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 30px; /* Mas bilugan na button */
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
}

/* Table Styles - Cleaner look */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.data-table th, .data-table td {
    border: 1px solid #e9ecef;
    padding: 12px;
    text-align: left;
}

.data-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
}

.add-row-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.2s ease;
}

.add-row-btn:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

/* Oral Health Indices Layout */
.indices-section {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.index-box {
    flex: 1; 
    border: 1px solid #e9ecef;
    padding: 20px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.index-box h4 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px dashed #f0f2f5;
    padding-bottom: 10px;
    font-weight: 600;
}

.small-input {
    width: 60px;
    text-align: center;
}

/* Interactive Dental Chart Styles */
.dental-chart-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.dental-chart-container h4 {
    margin-top: 0;
    color: #343a40;
    margin-bottom: 5px;
}

.chart-instruction {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 20px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 25px;
}

.legend-item { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.color-box { width: 18px; height: 18px; border-radius: 4px; display: inline-block; }
.color-box.normal { background-color: white; border: 2px solid #ced4da; }
.color-box.decayed { background-color: #ff6b6b; border: 2px solid #ff6b6b; }
.color-box.missing { background-color: #adb5bd; border: 2px solid #adb5bd; }
.color-box.filled { background-color: #4dabf7; border: 2px solid #4dabf7; }

.dental-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.jaw {
    display: flex;
    gap: 25px;
}

.tooth-row {
    display: flex;
    gap: 6px;
}

.tooth {
    width: 38px;
    height: 48px;
    background-color: white;
    border: 2px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tooth:hover {
    border-color: #007bff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

/* Tooth Status Colors */
.tooth.decayed { background-color: #ff6b6b; color: white; border-color: #ff6b6b; }
.tooth.missing { background-color: #adb5bd; color: white; border-color: #adb5bd; text-decoration: line-through; opacity: 0.8; }
.tooth.filled { background-color: #4dabf7; color: white; border-color: #4dabf7; }
