/* ====================================
   CALORIE DEFICIT AI - ADVANCED CSS
   ==================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    background: #f8fafc;
}

/* Page Management */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* ====================================
   ANIMATED BACKGROUND
   ==================================== */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -2;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { 
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); 
    }
    33% { 
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ffd676 100%); 
    }
    66% { 
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #43e97b 100%); 
    }
}

/* Floating Icons */
.floating-icons {
    position: fixed;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.float-icon {
    position: absolute;
    font-size: 40px;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

/* ====================================
   LANDING PAGE STYLES
   ==================================== */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.card-auth {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease;
}

.card-input {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.icon-large {
    width: 64px;
    height: 64px;
    color: #22c55e;
    margin: 0 auto 16px;
}

.icon-medium {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin: 0 auto 16px;
}

.animated-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.animated-bounce {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.header-section h1 {
    font-size: 36px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.header-section h2 {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.header-section p {
    color: #6b7280;
    font-size: 16px;
}

/* ====================================
   GOOGLE AUTH STYLES
   ==================================== */


.btn-google {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 2px solid #dadce0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-google:hover {
    border-color: #bdc1c6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* ====================================
   FORM STYLES
   ==================================== */
.form-container h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fee2e2;
    border-radius: 6px;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #22c55e 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a 0%, #2563eb 100%);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px;
    font-size: 18px;
    margin-top: 24px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #d1d5db;
}

.divider span {
    padding: 0 16px;
    color: #6b7280;
    font-weight: 500;
}

.switch-form {
    text-align: center;
    margin-top: 24px;
    color: #6b7280;
}

.switch-form a {
    color: #22c55e;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.switch-form a:hover {
    color: #16a34a;
}

/* ====================================
   NAVBAR STYLES
   ==================================== */
.navbar {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.icon-nav {
    width: 40px;
    height: 40px;
    color: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

.nav-logo span {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #718096;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
}

.user-info span {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.btn-icon {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.btn-icon svg {
    width: 32px;
    height: 32px;
    color: #374151;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-logout svg {
    width: 20px;
    height: 20px;
}

/* ====================================
   CONTENT PAGES
   ==================================== */
.content {
    display: none;
    flex: 1;
    padding: 40px 30px;
    width: 100%;
    box-sizing: border-box;
}

.content.active {
    display: block;
}

/* Dashboard Page */
#dashboardPage {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 50%, #e0e7ff 100%);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Analytics Page */
#analyticsPage,
#harianPage {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 50%, #e0e7ff 100%);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.dashboard-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
    box-sizing: border-box;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 10px;
}

.welcome-section p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Quick Stats Overview */
.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
    justify-content: center;
}

.quick-stats .stat-card {
    flex: 0 1 300px;
    max-width: 350px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    line-height: 1;
}

.stat-card .stat-label {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 20px 20px 0 0;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #22c55e;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.feature-card p {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 14px;
}

.feature-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #22c55e;
}

.stat-label {
    color: #9ca3af;
    font-size: 12px;
}

.progress-mini {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.chart-section h3 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ====================================
   ANALYTICS DASHBOARD
   ==================================== */
.analytics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

.analytics-header {
    text-align: center;
    margin-bottom: 40px;
}

.analytics-header h2 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.analytics-filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.custom-date-picker {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.custom-date-picker input[type="date"] {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #2d3748;
    background: #f7fafc;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-date-picker input[type="date"]:hover {
    border-color: #667eea;
    background: white;
}

.custom-date-picker input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: white;
}

.custom-date-picker .date-separator {
    color: #718096;
    font-weight: 500;
    font-size: 16px;
}

.custom-date-picker .btn-add {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    white-space: nowrap;
}

.custom-date-picker .btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.analytics-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.analytics-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
    text-align: center;
}

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

.summary-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    gap: 15px;
    transition: all 0.3s ease;
}

.summary-card.surplus {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.summary-card.deficit {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.summary-card.balance {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    font-size: 2rem;
}

.summary-info {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
}

.summary-label {
    color: #718096;
    font-size: 0.9rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
}

.chart-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.chart-card h3 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    max-width: 100%;
}

/* ====================================
   HARIAN (DAILY INPUT)
   ==================================== */
.harian-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

.harian-header {
    text-align: center;
    margin-bottom: 40px;
}

.harian-header h2 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.harian-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
}

.harian-grid .input-card {
    flex: 0 1 calc(33.333% - 14px);
    min-width: 280px;
    max-width: 350px;
}

/* Row 2: Jam Tidur & Durasi Gym - will auto center with flexbox */

/* Make Ringkasan full width and centered */
.harian-grid .input-card.full-width {
    flex: 0 1 100%;
    max-width: 100%;
}

.input-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.input-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.input-card.full-width {
    grid-column: 1 / -1;
}

.input-card h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.input-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 0;
}

.input-group button {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.input-group button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
}

.summary-item span:first-child {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* ====================================
   MODAL STYLES (PERFECT CENTERING)
   ==================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
}

.modal-large {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1000px;  /* ⭐ DIPERBESAR untuk modal Lihat Semua */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h3,
.modal-large h3 {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 2px solid #f1f5f9;
    font-size: 1.8rem;
    color: #1e293b;
    margin: 0;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #ef4444;
    transform: scale(1.1);
}

/* Profile Modal Specific - WIDE VERSION */
.modal-profile-wide {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 780px !important;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
}

/* ========================================
   IMPROVED PROFILE STYLES
   Better Readability & Visual Hierarchy
   Replace in index.css starting from line 1199
   ======================================== */

.profile-modal-body {
    padding: 40px 50px;
    background: #ffffff;
}

/* Header Section - More Prominent */
.profile-header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding: 25px;
    background: transparent;
    border-radius: 0;
    border: none; border-bottom: 2px solid #e5e7eb;
    box-shadow: none;
}

.profile-avatar-large {
    flex-shrink: 0;
}

.profile-photo-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 5px solid #22c55e;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
    object-fit: cover;
}

.profile-placeholder-large {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #60a5fa;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.3);
}

.profile-placeholder-large svg {
    width: 65px;
    height: 65px;
    color: #3b82f6;
}

.profile-name-section {
    flex: 1;
    text-align: left;
}

/* Name - Larger & Bolder */
.profile-name-section h2 {
    font-size: 2rem;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.5px;
}

/* Email - More Visible */
.profile-email {
    color: #475569;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* Profile Info Grid - Enhanced Cards */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.profile-info-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 18px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

/* Icon - Larger & More Colorful */
.info-card-icon {
    font-size: 2.5rem;
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.3);
    color: #ffffff;
}

.info-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Label - Clearer */
.info-card-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Value - Larger & Bolder */
.info-card-value {
    font-size: 1.35rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.2;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
}

.btn-edit-profile {
    padding: 16px 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-edit-profile:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.btn-edit-profile:active {
    transform: translateY(-1px);
}

/* Data Management Section */
.data-management-section {
    padding-top: 30px;
    border-top: 3px solid #e2e8f0;
}

/* Responsive - Mobile Optimization */
@media (max-width: 768px) {
    .profile-modal-body {
        padding: 25px 20px;
    }
    
    .profile-header-section {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    
    .profile-name-section {
        text-align: center;
    }
    
    .profile-name-section h2 {
        font-size: 1.6rem;
    }
    
    .profile-email {
        font-size: 1rem;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-info-card {
        padding: 20px;
    }
    
    .info-card-icon {
        font-size: 2.2rem;
        min-width: 55px;
        height: 55px;
    }
    
    .info-card-value {
        font-size: 1.2rem;
    }
    
    .btn-edit-profile {
        width: 100%;
        justify-content: center;
        padding: 14px 30px;
    }
}

/* Data Management Section */
.data-management-section {
    padding-top: 25px;
    border-top: 2px solid #f1f5f9;
}

.data-management-section h4 {
    color: #475569;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
}

.data-management-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.btn-export {
    padding: 14px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-export:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-clear {
    padding: 14px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.data-management-note {
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

/* Edit Mode Styles */
.edit-mode-title {
    font-size: 1.5rem;
    color: #1f2937;
    margin-top: 10px;
}

.profile-edit-form {
    max-width: 100%;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.edit-form-group {
    display: flex;
    flex-direction: column;
}

.edit-form-group.full-width {
    grid-column: span 2;
}

.edit-form-group label {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
}

.edit-form-group input,
.edit-form-group select {
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.edit-form-group input:focus,
.edit-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: white;
}

.edit-form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 15px;
}

.btn-cancel-edit {
    padding: 14px 35px;
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-cancel-edit:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.btn-save-profile {
    padding: 14px 35px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-save-profile:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.5);
}

/* OLD Profile Modal Styles (keep for compatibility) */
.profile-info {
    padding: 20px 0;
}

.profile-photo-section {
    text-align: center;
    margin-bottom: 20px;
}

.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
}

.profile-placeholder {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.profile-placeholder svg {
    width: 40px;
    height: 40px;
    color: #9ca3af;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
}

.info-value {
    color: #2d3748;
    font-weight: 500;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Modal Input Sections */
.input-section {
    margin-bottom: 25px;
}

.input-section label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 16px;
}

.input-with-btn {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.input-with-btn input,
.input-with-btn select {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-with-btn input:focus,
.input-with-btn select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-add {
    padding: 12px 24px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn-camera {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-bottom: 10px;
}

.btn-camera:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
}

/* Stats Display for Centered Layout */
.stats-display {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.stat-box {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    gap: 15px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e40af;
    line-height: 1;
}

.stat-text {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 5px;
}

/* Water Progress */
.water-progress {
    margin: 25px 0;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
}

.water-progress h4 {
    color: #1e40af;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.water-progress p {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
    margin: 10px 0 0 0;
}

/* AI Analysis */
.ai-analysis {
    margin: 25px 0;
}

.ai-analysis h4 {
    color: #6366f1;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.ai-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #6366f1;
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
}

.ai-box p {
    margin: 0 0 10px 0;
}

.ai-box p:last-child {
    margin-bottom: 0;
}

/* History Section */
.history-section {
    margin: 25px 0 0 0;
}

.history-section h4 {
    color: #475569;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.history-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: #f1f5f9;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 10px 0;
}

/* Gym Category Styling */
.input-section select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.input-section select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.exercise-category-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    color: #1e293b;
}

.exercise-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.benefit-item {
    background: rgba(59, 130, 246, 0.1);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ====================================
   FIXED HAMBURGER BUTTON (Mobile Only)
   ==================================== */
.fixed-hamburger-btn {
    display: none;
    position: fixed;
    top: 18px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10002;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    -webkit-tap-highlight-color: transparent;
}

.fixed-hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.fixed-hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.fixed-hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.fixed-hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ====================================
   MOBILE HAMBURGER MENU
   ==================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border: 2px solid #667eea;
    cursor: pointer;
    padding: 8px;
    z-index: 99999 !important;
    border-radius: 8px;
    transition: background 0.3s ease;
    position: relative;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-menu-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #374151;
    border-radius: 3px;
    transition: all 0.3s ease;
    margin: 3px 0;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Slide Menu */
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transition: right 0.3s ease;
    padding: 80px 20px 30px;
    overflow-y: auto;
}

.mobile-nav-menu.active {
    display: block !important;
    right: 0;
}

.mobile-nav-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 8px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-nav-menu .nav-link:hover,
.mobile-nav-menu .nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

.mobile-nav-menu .nav-link .nav-icon {
    font-size: 20px;
}

.mobile-user-section {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
}

.mobile-user-info .user-avatar {
    width: 40px;
    height: 40px;
}

.mobile-user-info .user-email {
    font-size: 13px;
    color: #6b7280;
    word-break: break-all;
}

.mobile-logout-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.mobile-logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ====================================
   RESPONSIVE DESIGN - LARGE TABLETS (1024px and above)
   ==================================== */
@media (max-width: 1100px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-link {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .dashboard-content {
        padding: 30px 20px;
    }
    
    .analytics-container {
        padding: 0 15px;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Harian - 3 columns on large tablet */
    .harian-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .input-card {
        padding: 18px;
    }
    
    .input-card h3 {
        font-size: 1.1rem;
    }
}

/* ====================================
   RESPONSIVE DESIGN - TABLETS (iPad Pro ~1024px)
   ==================================== */
@media (max-width: 1024px) and (min-width: 901px) {
    /* Harian - flexbox layout for iPad Pro */
    .harian-grid {
        gap: 12px;
    }
    
    .harian-grid .input-card {
        flex: 0 1 calc(33.333% - 10px);
        min-width: 200px;
        max-width: 300px;
    }
    
    .input-card {
        padding: 15px;
    }
    
    .input-card h3 {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    /* Keep input and button in same row but smaller */
    .input-group {
        flex-direction: row;
        gap: 8px;
    }
    
    .input-group input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .input-group button {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ====================================
   RESPONSIVE DESIGN - TABLETS (Small) & Mobile
   ==================================== */
@media (max-width: 900px) {
    /* Show Fixed Hamburger */
    .fixed-hamburger-btn {
        display: flex !important;
    }
    
    /* Show Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        position: relative !important;
        z-index: 99999 !important;
        pointer-events: all !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-menu-overlay,
    .mobile-nav-menu {
        display: block;
    }
    
    /* Hide Desktop Navigation */
    .nav-links {
        display: none !important;
    }
    
    .nav-actions .user-info {
        display: none !important;
    }
    
    .nav-actions .btn-logout {
        display: none !important;
    }
    
    .nav-actions .btn-icon {
        display: none !important;
    }
    
    /* Make sure nav-actions only shows hamburger */
    .nav-actions {
        position: relative;
        z-index: 100;
    }
    
    /* Navbar Adjustments */
    .nav-container {
        height: 70px;
        padding: 0 16px;
    }
    
    .nav-logo span {
        font-size: 18px;
    }
    
    .icon-nav {
        width: 32px;
        height: 32px;
    }
    
    /* Harian - 2 columns on small tablet */
    .harian-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* Content Area */
    .content {
        padding: 20px 16px;
    }
    
    .dashboard-content {
        padding: 20px 16px;
    }
    
    /* Welcome Section */
    .welcome-section {
        margin-bottom: 30px;
    }
    
    .welcome-section h1 {
        font-size: 1.8rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
    
    /* Analytics */
    .analytics-header {
        margin-bottom: 25px;
    }
    
    .analytics-header h2 {
        font-size: 1.8rem;
    }
    
    .analytics-filters {
        gap: 8px;
        padding: 0 10px;
    }
    
    .filter-btn {
        padding: 10px 14px;
        font-size: 13px;
        flex: 1;
        min-width: auto;
        text-align: center;
    }
    
    .custom-date-picker {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        max-width: 100%;
        margin: 0 10px 20px 10px;
    }
    
    .custom-date-picker input[type="date"] {
        width: 100%;
        min-width: auto;
    }
    
    .custom-date-picker .btn-add {
        width: 100%;
    }
    
    /* Stats Grid */
    .quick-stats {
        gap: 16px;
    }
    
    .quick-stats .stat-card {
        flex: 0 1 calc(50% - 10px);
        max-width: none;
    }
    
    .quick-stats .stat-card:nth-child(3) {
        flex: 0 1 300px;
    }
    
    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card .stat-icon {
        font-size: 2rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
    
    .feature-icon {
        font-size: 40px;
    }
    
    /* Overview Stats */
    .overview-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 16px 12px;
    }
    
    .stat-item .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-item .stat-value {
        font-size: 1.4rem;
    }
    
    .stat-item .stat-label {
        font-size: 11px;
    }
    
    /* Summary Grid */
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .summary-card {
        padding: 16px;
    }
    
    /* Charts */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    /* Analytics Card */
    .analytics-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    /* Harian Input - 2 columns for tablet */
    .harian-grid .input-card {
        flex: 0 1 calc(50% - 10px);
        min-width: 250px;
        max-width: none;
    }
    
    .input-card {
        padding: 20px;
    }
    
    /* Keep row layout for input group */
    .input-group {
        flex-direction: row;
        gap: 10px;
    }
    
    .input-group input {
        flex: 1;
        min-width: 0;
    }
    
    .input-group button {
        flex-shrink: 0;
    }
    
    .input-with-btn {
        flex-direction: row;
        gap: 10px;
    }
    
    .input-with-btn input,
    .input-with-btn select {
        min-width: auto;
        flex: 1;
    }
    
    .input-with-btn .btn-add {
        width: auto;
        min-width: 80px;
    }
    
    /* Modals */
    .modal-content,
    .modal-large {
        max-width: 95%;
        margin: 15px auto;
        max-height: 90vh;
    }
    
    .modal-profile-wide {
        max-width: 90%;
        margin: 15px auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .profile-modal-body {
        padding: 20px;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    
    .edit-form-grid {
        grid-template-columns: 1fr;
    }
    
    .edit-form-group.full-width {
        grid-column: span 1;
    }
    
    .data-management-buttons {
        grid-template-columns: 1fr;
    }
    
    .edit-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-cancel-edit,
    .btn-save-profile {
        width: 100%;
        justify-content: center;
    }
    
    /* Form Grid */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Input Grid */
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    /* Card Auth/Input */
    .card-auth,
    .card-input {
        padding: 28px 24px;
        margin: 10px;
    }
    
    .header-section h1 {
        font-size: 26px;
    }
    
    .header-section h2 {
        font-size: 22px;
    }
    
    /* Chart Section */
    .chart-section {
        padding: 20px;
    }
    
    .chart-section h3 {
        font-size: 1.2rem;
    }
}

/* ====================================
   RESPONSIVE DESIGN - MOBILE PHONES
   ==================================== */
@media (max-width: 480px) {
    /* Navbar */
    .nav-container {
        height: 60px;
        padding: 0 12px;
    }
    
    .nav-logo span {
        font-size: 16px;
    }
    
    .icon-nav {
        width: 28px;
        height: 28px;
    }
    
    /* Hide Floating Icons */
    .floating-icons {
        display: none;
    }
    
    /* Content */
    .content {
        padding: 16px 12px;
    }
    
    .dashboard-content {
        padding: 16px 12px;
    }
    
    /* Welcome Section */
    .welcome-section h1 {
        font-size: 1.5rem;
    }
    
    .welcome-section p {
        font-size: 0.9rem;
    }
    
    /* Analytics Header */
    .analytics-header h2,
    .harian-header h2 {
        font-size: 1.5rem;
    }
    
    .analytics-header p {
        font-size: 0.9rem;
    }
    
    /* Filter Buttons - 2x2 Grid */
    .analytics-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 5px;
    }
    
    .filter-btn {
        padding: 12px 8px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    /* Quick Stats - Single Column */
    .quick-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .quick-stats .stat-card {
        flex: 0 1 100%;
        max-width: 100%;
    }
    
    .quick-stats .stat-card:nth-child(3) {
        flex: 0 1 100%;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
        padding: 16px;
    }
    
    .stat-card .stat-icon {
        font-size: 1.8rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-card .stat-label {
        font-size: 0.8rem;
    }
    
    /* Overview Stats - 2 Column */
    .overview-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 14px 10px;
    }
    
    .stat-item .stat-icon {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .stat-item .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-item .stat-label {
        font-size: 10px;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 20px 16px;
    }
    
    .feature-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .feature-card h3 {
        font-size: 16px;
    }
    
    .feature-card p {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    /* Analytics Card */
    .analytics-card {
        padding: 16px;
        border-radius: 16px;
    }
    
    .analytics-card h3 {
        font-size: 1.1rem;
    }
    
    /* Summary Cards */
    .summary-card {
        padding: 14px;
    }
    
    .summary-icon {
        font-size: 1.5rem;
    }
    
    .summary-value {
        font-size: 1.2rem;
    }
    
    .summary-label {
        font-size: 11px;
    }
    
    /* Charts */
    .chart-card {
        padding: 16px;
        border-radius: 16px;
    }
    
    .chart-card h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .chart-container {
        height: 200px;
    }
    
    /* Custom Date Picker */
    .custom-date-picker {
        padding: 14px;
        margin: 0 5px 16px 5px;
        border-radius: 12px;
    }
    
    .custom-date-picker input[type="date"] {
        padding: 12px;
        font-size: 14px;
    }
    
    .custom-date-picker .btn-add {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Input Card */
    .input-card {
        padding: 16px;
        border-radius: 16px;
    }
    
    .input-card h3 {
        font-size: 1.1rem;
    }
    
    /* Harian Grid - Single Column on Mobile */
    .harian-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .harian-grid .input-card {
        flex: 0 1 100%;
        min-width: auto;
        max-width: 100%;
    }
    
    .input-with-btn {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-with-btn input,
    .input-with-btn select {
        width: 100%;
    }
    
    .input-with-btn .btn-add {
        width: 100%;
    }
    
    /* Stat Box */
    .stat-box {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 16px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    /* Card Auth/Input */
    .card-auth,
    .card-input {
        padding: 24px 18px;
        border-radius: 20px;
        margin: 8px;
    }
    
    .header-section h1 {
        font-size: 22px;
    }
    
    .header-section h2 {
        font-size: 20px;
    }
    
    .header-section p {
        font-size: 14px;
    }
    
    .icon-large {
        width: 50px;
        height: 50px;
    }
    
    .icon-medium {
        width: 40px;
        height: 40px;
    }
    
    /* Form */
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .btn-primary {
        padding: 14px;
        font-size: 15px;
    }
    
    /* Modal */
    .modal-content,
    .modal-large {
        margin: 10px;
        max-height: 92vh;
        border-radius: 16px;
    }
    
    .modal-content h3,
    .modal-large h3 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    /* AI Analysis */
    .ai-analysis h4 {
        font-size: 1rem;
    }
    
    .ai-box {
        padding: 14px;
        font-size: 13px;
    }
    
    /* History Section */
    .history-section h4 {
        font-size: 1rem;
    }
    
    .history-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Water Progress */
    .water-progress h4 {
        font-size: 1rem;
    }
    
    .water-progress p {
        font-size: 14px;
    }
    
    /* Chart Section */
    .chart-section {
        padding: 16px;
        border-radius: 16px;
    }
    
    .chart-section h3 {
        font-size: 1.1rem;
    }
    
    /* Buttons */
    .btn-add {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-camera {
        padding: 12px;
        font-size: 14px;
    }
}

/* ====================================
   RESPONSIVE DESIGN - VERY SMALL SCREENS
   ==================================== */
@media (max-width: 360px) {
    .nav-logo span {
        font-size: 14px;
    }
    
    .icon-nav {
        width: 24px;
        height: 24px;
    }
    
    .welcome-section h1 {
        font-size: 1.3rem;
    }
    
    .analytics-header h2,
    .harian-header h2 {
        font-size: 1.3rem;
    }
    
    .filter-btn {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item .stat-value {
        font-size: 1.1rem;
    }
    
    .card-auth,
    .card-input {
        padding: 20px 14px;
    }
    
    .header-section h1 {
        font-size: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ====================================
   LANDSCAPE ORIENTATION FIXES
   ==================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content,
    .modal-large {
        max-height: 95vh;
        margin: 10px auto;
    }
    
    .modal-body {
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .card-auth,
    .card-input {
        padding: 20px;
    }
    
    .header-section {
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
}

/* ====================================
   TOUCH DEVICE OPTIMIZATIONS
   ==================================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .filter-btn {
        min-height: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .btn-add,
    .btn-primary,
    .btn-logout {
        min-height: 48px;
    }
    
    .feature-card {
        min-height: 120px;
    }
    
    /* Remove hover effects on touch */
    .feature-card:hover {
        transform: none;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    /* Add active states for touch feedback */
    .filter-btn:active {
        transform: scale(0.98);
        background: #667eea;
        color: white;
    }
    
    .feature-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active {
        transform: scale(0.98);
    }
    
    .btn-add:active {
        transform: scale(0.98);
    }
}

/* Scrollbar Styling */
.history-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.modal-large::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track,
.modal-large::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb,
.modal-large::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover,
.modal-large::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

/* Chart Loading State */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6b7280;
    font-size: 1.1rem;
}

.chart-loading::before {
    content: '📊';
    font-size: 2rem;
    margin-right: 10px;
    animation: pulse 2s ease-in-out infinite;
}

/* Success/Error States */
.success-message {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #22c55e;
    margin: 10px 0;
    animation: slideDown 0.3s ease;
}

.warning-message {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin: 10px 0;
    animation: slideDown 0.3s ease;
}
/* Responsive Profile Header */
@media (max-width: 768px) {
    .profile-header-section {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .profile-name-section {
        text-align: center;
    }
    
    .profile-name-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .profile-photo-large,
    .profile-placeholder-large {
        width: 80px;
        height: 80px;
    }
    
    .profile-placeholder-large svg {
        width: 40px;
        height: 40px;
    }
    
    .profile-name-section h2 {
        font-size: 1.3rem;
    }
    
    .profile-email {
        font-size: 0.9rem;
    }
}

/* =============================================
   WEIGHT TRACKER STYLES
   ============================================= */

/* Weight Tracker Section */
.weight-tracker-section {
    margin: 30px 0;
}

.weight-tracker-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 2px solid #e5e7eb;
}

/* Weight Header */
.weight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

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

.weight-icon {
    font-size: 2rem;
}

.weight-title h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.btn-weight-input {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-weight-input:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Current Weight Status */
.weight-current-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    border: 2px solid #bfdbfe;
}

.weight-stat-box {
    text-align: center;
    flex: 1;
}

.weight-stat-box.highlight {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    border: 2px solid #3b82f6;
}

.stat-label-small {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.stat-value-medium {
    font-size: 1.8rem;
    font-weight: 700;
    color: #374151;
    line-height: 1;
}

.stat-unit-small {
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: 500;
}

.weight-progress-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

.trend-icon {
    font-size: 1.5rem;
}

.trend-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

.progress-change,
.progress-remaining {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.progress-change {
    background: #dbeafe;
    color: #1e40af;
}

.progress-change.up {
    background: #fee2e2;
    color: #dc2626;
}

.progress-change.down {
    background: #dcfce7;
    color: #16a34a;
}

.progress-remaining {
    background: #fef3c7;
    color: #d97706;
}

/* Goal Badge */
.weight-goal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    padding: 12px 20px;
    border-radius: 30px;
    margin: 15px 0;
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-text {
    font-weight: 600;
    color: #92400e;
    font-size: 0.95rem;
}

/* Mini Chart - ENLARGED VERSION */
.weight-chart-mini {
    margin: 30px 0;
}

.weight-chart-mini h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 20px;
}

.chart-container-mini {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    height: 350px !important;  /* ⭐ TAMBAH !important */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chart-container-mini canvas {
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;  /* ⭐ TAMBAH ini */
}

/* History Preview */
.weight-history-preview {
    margin-top: 25px;
}

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

.history-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin: 0;
}

.btn-text {
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.btn-text:hover {
    color: #2563eb;
    text-decoration: underline;
}

.history-list-mini {
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-item-date {
    display: flex;
    flex-direction: column;
}

.history-date {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.history-time {
    font-size: 0.8rem;
    color: #9ca3af;
}

.history-item-weight {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-weight-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

.history-weight-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.history-weight-change.up {
    background: #fee2e2;
    color: #dc2626;
}

.history-weight-change.down {
    background: #dcfce7;
    color: #16a34a;
}

.history-weight-change.same {
    background: #e5e7eb;
    color: #6b7280;
}

/* No Data Message */
.no-data-message {
    text-align: center;
    padding: 40px 20px;
}

.no-data-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.no-data-message p {
    color: #6b7280;
    margin: 5px 0;
}

.no-data-hint {
    font-size: 0.9rem;
    color: #9ca3af;
}

/* Weight Change Preview (in modal) */
.weight-change-preview {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px;
    border: 2px solid #93c5fd;
}

.preview-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.preview-icon {
    font-size: 2.5rem;
}

.preview-content {
    flex: 1;
}

.preview-change {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 5px;
}

.preview-text {
    font-size: 0.95rem;
    color: #1e40af;
}

/* History Modal - Summary Stats */
.history-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.summary-stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.summary-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    display: block;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* Chart Section */
.chart-section {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

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

.chart-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
}

.chart-filter-btn.active,
.chart-filter-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.chart-container {
    height: 350px;
}

.chart-container canvas {
    max-height: 100%;
}

/* History Table */
.history-table-section {
    margin-top: 30px;
}

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

.table-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.btn-export {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background: #059669;
    transform: translateY(-2px);
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.history-table thead {
    background: #f9fafb;
}

.history-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.history-table td {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.history-table tbody tr:hover {
    background: #f9fafb;
}

.history-table .no-data {
    text-align: center;
    color: #9ca3af;
    padding: 40px;
}

.weight-change-cell {
    font-weight: 600;
}

.weight-change-cell.positive {
    color: #dc2626;
}

.weight-change-cell.negative {
    color: #16a34a;
}

.btn-delete-entry {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-delete-entry:hover {
    background: #fecaca;
}

/* Responsive */
@media (max-width: 768px) {
    .weight-current-status {
        flex-direction: column;
        gap: 20px;
    }
    
    .weight-stat-box {
        width: 100%;
    }
    
    .weight-progress-arrow {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }
    
    .history-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-controls {
        flex-wrap: wrap;
    }
    
    .chart-filter-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .weight-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .btn-weight-input {
        width: 100%;
    }
    
    .history-summary-stats {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .history-table {
        font-size: 0.85rem;
    }
    
    .history-table th,
    .history-table td {
        padding: 10px 8px;
    }
}

/* =============================================
   WEIGHT HISTORY MODAL - EXTRA WIDE
   ============================================= */

/* Extra Wide Modal untuk Weight History */
.modal-extra-wide {
    background: rgb(255, 255, 255);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 1800px;  /* ⭐ LEBIH LEBAR - dari 600px jadi 1200px */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
    padding: 30px;
}

/* Summary Stats - Lebih lebar & rapi */
.modal-extra-wide .history-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.modal-extra-wide .summary-stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 25px;  /* ⭐ Padding lebih besar */
    text-align: center;
    transition: all 0.3s ease;
}

.modal-extra-wide .summary-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.modal-extra-wide .summary-icon {
    font-size: 2.5rem;  /* ⭐ Icon lebih besar */
    margin-bottom: 15px;
}

.modal-extra-wide .summary-value {
    font-size: 2rem;  /* ⭐ Value lebih besar */
    font-weight: 700;
    color: #1f2937;
    display: block;
    margin-bottom: 8px;
}

.modal-extra-wide .summary-label {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* Chart Section - Lebih tinggi */
.modal-extra-wide .chart-container {
    height: 450px;  /* ⭐ Chart lebih tinggi - dari 350px jadi 450px */
}

/* Table - Font & padding lebih besar */
.modal-extra-wide .history-table {
    font-size: 0.95rem;  /* ⭐ Font sedikit lebih besar */
}

.modal-extra-wide .history-table th {
    padding: 18px 15px;  /* ⭐ Padding lebih besar */
}

.modal-extra-wide .history-table td {
    padding: 16px 15px;  /* ⭐ Padding lebih besar */
}

/* Responsive untuk modal extra wide */
@media (max-width: 1280px) {
    .modal-extra-wide {
        width: 90%;
        max-width: 1600px;  /* ⭐ DIPERBESAR untuk layar <1280px */
    }
}

@media (max-width: 968px) {
    .modal-extra-wide {
        width: 95%;
        max-width: 900px;  /* Tablet */
    }
    
    .modal-extra-wide .history-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .modal-extra-wide {
        width: 95%;
        padding: 20px;
    }
    
    .modal-extra-wide .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .modal-extra-wide {
        width: 100%;
        padding: 15px;
        border-radius: 12px;
    }
    
    .modal-extra-wide .history-summary-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-extra-wide .chart-container {
        height: 250px;
    }
    
    .modal-extra-wide .summary-stat-card {
        padding: 15px;
    }
    
    .modal-extra-wide .summary-icon {
        font-size: 2rem;
    }
    
    .modal-extra-wide .summary-value {
        font-size: 1.5rem;
    }
}

/* =============================================
   WEIGHT INPUT MODAL - WIDER VERSION
   ============================================= */

/* Modal Medium-Wide untuk Input Weight */
.modal-medium-wide {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 700px;  /* ⭐ Lebih lebar dari 500px */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
}

/* Modal Header */
.modal-medium-wide .modal-header {
    padding: 30px 30px 20px;
    border-bottom: 2px solid #f1f5f9;
}

.modal-medium-wide .modal-header h3 {
    text-align: center;
    font-size: 1.8rem;
    color: #1e293b;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.modal-medium-wide .modal-header p {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Modal Body */
.modal-medium-wide .modal-body {
    padding: 30px 40px;
}

/* Form Groups - Lebih lebar & spacing lebih baik */
.modal-medium-wide .form-group {
    margin-bottom: 25px;
}

.modal-medium-wide .form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
}

.modal-medium-wide .form-group input[type="date"],
.modal-medium-wide .form-group input[type="number"],
.modal-medium-wide .form-group select,
.modal-medium-wide .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.modal-medium-wide .form-group input:focus,
.modal-medium-wide .form-group select:focus,
.modal-medium-wide .form-group textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
    background: white;
}

/* Input with Unit */
.modal-medium-wide .input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.modal-medium-wide .input-with-unit input {
    flex: 1;
    padding-right: 60px;
}

.modal-medium-wide .input-with-unit .unit {
    position: absolute;
    right: 18px;
    color: #6b7280;
    font-weight: 600;
    font-size: 1rem;
    pointer-events: none;
}

/* Required Asterisk */
.modal-medium-wide .required {
    color: #ef4444;
    margin-left: 4px;
}

/* Weight Change Preview */
.modal-medium-wide .weight-change-preview {
    margin: 25px 0;
    padding: 20px 25px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 16px;
    border: 2px solid #6ee7b7;
}

.modal-medium-wide .preview-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.modal-medium-wide .preview-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.modal-medium-wide .preview-content {
    flex: 1;
}

.modal-medium-wide .preview-change {
    font-size: 1.8rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
    line-height: 1;
}

.modal-medium-wide .preview-text {
    font-size: 1.05rem;
    color: #047857;
    font-weight: 500;
}

/* Form Actions */
.modal-medium-wide .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-medium-wide .btn-secondary {
    flex: 1;
    padding: 14px 20px;
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-medium-wide .btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.modal-medium-wide .btn-primary {
    flex: 2;
    padding: 14px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.modal-medium-wide .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-medium-wide {
        width: 95%;
        max-width: 95%;
    }
    
    .modal-medium-wide .modal-body {
        padding: 25px 20px;
    }
    
    .modal-medium-wide .form-actions {
        flex-direction: column;
    }
    
    .modal-medium-wide .btn-secondary,
    .modal-medium-wide .btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-medium-wide {
        width: 100%;
        border-radius: 16px;
    }
    
    .modal-medium-wide .modal-body {
        padding: 20px 16px;
    }
    
    .modal-medium-wide .modal-header h3 {
        font-size: 1.4rem;
    }
    
    .modal-medium-wide .form-group {
        margin-bottom: 20px;
    }
    
    .modal-medium-wide .form-group input,
    .modal-medium-wide .form-group select,
    .modal-medium-wide .form-group textarea {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .modal-medium-wide .preview-change {
        font-size: 1.5rem;
    }
    
    .modal-medium-wide .preview-text {
        font-size: 0.95rem;
    }
}

/* ========================================
   GOOGLE SIGN-IN BUTTON STYLES
   Added: 2026-01-01
   ======================================== */
/* Manual Google Button (Fallback) */
.btn-google-manual {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #dadce0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google-manual:hover {
    background: #f8f9fa;
    border-color: #d2d3d4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-google-manual:active {
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-google-manual svg {
    margin-right: 10px;
    flex-shrink: 0;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    
    .btn-google-manual {
        font-size: 13px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {

    
    .btn-google-manual {
        max-width: 100%;
        font-size: 12px;
    }
}

/* ========================================
   CENTERED GOOGLE BUTTON FIX
   Paste di paling bawah public/index.css
   Replace ULTIMATE-FIX yang lama
   ======================================== */
/* Divider - Clear Lines */
.divider {
    display: flex !important;
    align-items: center !important;
    margin: 25px 0 !important;
    width: 100% !important;
}

.divider::before,
.divider::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background-color: #cbd5e0 !important;
}

.divider::before {
    margin-right: 15px !important;
}

.divider::after {
    margin-left: 15px !important;
}

.divider span {
    color: #718096 !important;
    font-size: 14px !important;
}

/* Modal Width */
.modal-content,
#loginModal .modal-content {
    max-width: 480px !important;
    width: 90% !important;
}

/* Input Fields */
#loginModal input[type="email"],
#loginModal input[type="password"],
.form-group input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 8px !important;
    background-color: #f7fafc !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
}

#loginModal input:focus {
    border-color: #4299e1 !important;
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1) !important;
}

/* Button */
#loginModal button,
button[onclick*="handleLogin"] {
    width: 100% !important;
    padding: 13px 20px !important;
    background: linear-gradient(90deg, #48bb78 0%, #4299e1 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

/* ========================================
   SPACING & CENTERING FIX
   Paste di paling bawah public/index.css
   Replace Google section yang lama
   ======================================== */

/* Google One Tap Container - Reduce Margin */
.google-signin-section {
    margin: 20px 0 15px 0 !important;  /* Reduced from 25px */
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#googleButtonContainer {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Google Button/Card - Perfect Center */
.g_id_signin {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.g_id_signin > div {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
}

.g_id_signin iframe {
    margin: 0 auto !important;
    display: block !important;
}

/* Divider - Reduce Top Margin */
.divider {
    display: flex !important;
    align-items: center !important;
    margin: 15px 0 20px 0 !important;  /* Reduced top from 25px */
    width: 100% !important;
}

.divider::before,
.divider::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background-color: #cbd5e0 !important;
}

.divider::before {
    margin-right: 15px !important;
}

.divider::after {
    margin-left: 15px !important;
}

.divider span {
    color: #718096 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Modal Width */
.modal-content,
#loginModal .modal-content {
    max-width: 480px !important;
    width: 90% !important;
}

/* Input Fields */
#loginModal input[type="email"],
#loginModal input[type="password"],
.form-group input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 8px !important;
    background-color: #f7fafc !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
}

#loginModal input:focus {
    border-color: #4299e1 !important;
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1) !important;
}

/* Labels */
#loginModal label,
.form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    color: #2d3748 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Login Button */
#loginModal button,
button[onclick*="handleLogin"] {
    width: 100% !important;
    padding: 13px 20px !important;
    background: linear-gradient(90deg, #48bb78 0%, #4299e1 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-top: 10px !important;
}

/* Modal Body - Adjust Padding */
#loginModal .modal-body {
    padding: 28px 36px 32px 36px !important;
}

/* Modal Header */
#loginModal .modal-header {
    padding: 24px 36px 18px 36px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

#loginModal .modal-header h3 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    text-align: center !important;
}

/* Register Link */
.register-link {
    text-align: center !important;
    margin-top: 20px !important;
    font-size: 14px !important;
    color: #718096 !important;
}

.register-link a {
    color: #48bb78 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* Form Groups */
.form-group {
    margin-bottom: 18px !important;
}/* ============================================
   MODAL PROFILE - RESPONSIVE & BALANCED
   Sesuai screenshot referensi
   ============================================ */

/* Override semua definisi sebelumnya */
.modal-content.modal-profile-wide {
    max-width: 780px !important;
    width: 95% !important;
    padding: 0 !important;
    margin: auto !important;
}

.modal-content.modal-profile-wide .profile-modal-body {
    padding: 40px 50px !important;
}

.modal-content.modal-profile-wide .profile-header-section {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #e5e7eb !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    gap: 30px !important;
    padding: 0 0 30px 0 !important;
    margin-bottom: 35px !important;
}

.modal-content.modal-profile-wide .profile-info-grid {
    gap: 20px !important;
    grid-template-columns: repeat(2, 1fr) !important;
}

.modal-content.modal-profile-wide .profile-info-card {
    padding: 20px !important;
}

/* Responsive untuk tablet */
@media (max-width: 900px) {
    .modal-content.modal-profile-wide {
        max-width: 90% !important;
        width: 90% !important;
    }
    
    .modal-content.modal-profile-wide .profile-modal-body {
        padding: 35px 40px !important;
    }
}

/* Responsive untuk mobile */
@media (max-width: 768px) {
    .modal-content.modal-profile-wide {
        max-width: 95% !important;
        width: 95% !important;
    }
    
    .modal-content.modal-profile-wide .profile-modal-body {
        padding: 25px 20px !important;
    }
    
    .modal-content.modal-profile-wide .profile-header-section {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px !important;
        padding: 0 0 25px 0 !important;
    }
    
    .modal-content.modal-profile-wide .profile-info-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .modal-content.modal-profile-wide .profile-info-card {
        padding: 18px !important;
    }
}

/* Responsive untuk mobile kecil */
@media (max-width: 480px) {
    .modal-content.modal-profile-wide {
        max-width: 98% !important;
        width: 98% !important;
        margin: 10px auto !important;
    }
    
    .modal-content.modal-profile-wide .profile-modal-body {
        padding: 20px 15px !important;
    }
    
    .modal-content.modal-profile-wide .profile-header-section {
        padding: 0 0 20px 0 !important;
        margin-bottom: 25px !important;
    }
    
    .modal-content.modal-profile-wide .profile-info-grid {
        gap: 12px !important;
    }
    
    .modal-content.modal-profile-wide .profile-info-card {
        padding: 15px !important;
    }
}

/* ============================================
   BALANCE KOLOM KIRI & KANAN - EQUAL WIDTH
   ============================================ */

/* Pastikan grid benar-benar equal (1fr 1fr) */
.modal-content.modal-profile-wide .profile-info-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    width: 100% !important;
}

/* Pastikan setiap card punya width sama */
.modal-content.modal-profile-wide .profile-info-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px !important;
}

/* Content di dalam card */
.modal-content.modal-profile-wide .info-card-content {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
}

/* Text overflow handling untuk text panjang */
.modal-content.modal-profile-wide .info-card-value {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    line-height: 1.4 !important;
}

/* Responsive - tetap seimbang di tablet */
@media (max-width: 900px) {
    .modal-content.modal-profile-wide .profile-info-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Mobile - stack vertical */
@media (max-width: 768px) {
    .modal-content.modal-profile-wide .profile-info-grid {
        grid-template-columns: 1fr !important;
    }
}
/* ⭐ FORCE MODAL-EXTRA-WIDE TO BE WIDE - OVERRIDE SEMUA !important */
.modal-extra-wide {
    max-width: 1400px !important;  /* ⭐ Pas untuk desktop */
    width: 95% !important;
}

@media (max-width: 1280px) {
    .modal-extra-wide {
        max-width: 1200px !important;  /* ⭐ Pas untuk laptop */
        width: 90% !important;
    }
}

@media (max-width: 968px) {
    .modal-extra-wide {
        max-width: 900px !important;
        width: 95% !important;
    }
}

@media (max-width: 768px) {
    .modal-extra-wide {
        max-width: 95vw !important;
        width: 95% !important;
    }
}

@media (max-width: 480px) {
    .modal-extra-wide {
        max-width: 100vw !important;
        width: 100% !important;
    }
}
/* ⭐ MODAL RESPONSIVE - PERFECT WIDTH FOR ALL DEVICES */

/* Desktop Besar (>1440px) - Modal sedang */
.modal-extra-wide {
    max-width: 1200px !important;
    width: 90% !important;
}

/* Desktop Standard (1280px - 1440px) - Modal pas */
@media (max-width: 1440px) {
    .modal-extra-wide {
        max-width: 1100px !important;
        width: 88% !important;
    }
}

/* Laptop Besar (1024px - 1280px) - Modal nyaman */
@media (max-width: 1280px) {
    .modal-extra-wide {
        max-width: 1000px !important;
        width: 85% !important;
    }
}

/* Laptop Standard (968px - 1024px) - Modal compact */
@media (max-width: 1024px) {
    .modal-extra-wide {
        max-width: 900px !important;
        width: 90% !important;
    }
}

/* Tablet Landscape (768px - 968px) - Modal lebar */
@media (max-width: 968px) {
    .modal-extra-wide {
        max-width: 700px !important;
        width: 92% !important;
        padding: 25px !important;
    }
    
    /* Grid summary 2 kolom */
    .modal-extra-wide .history-summary-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

/* Tablet Portrait (600px - 768px) - Modal penuh */
@media (max-width: 768px) {
    .modal-extra-wide {
        max-width: 95% !important;
        width: 95% !important;
        padding: 20px !important;
        border-radius: 16px !important;
    }
    
    /* Chart lebih kecil */
    .modal-extra-wide .chart-container {
        height: 300px !important;
    }
}

/* Mobile Landscape (480px - 600px) - Modal hampir full */
@media (max-width: 600px) {
    .modal-extra-wide {
        max-width: 98% !important;
        width: 98% !important;
        padding: 18px !important;
    }
    
    /* Grid summary 1 kolom */
    .modal-extra-wide .history-summary-stats {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* Chart lebih kecil lagi */
    .modal-extra-wide .chart-container {
        height: 280px !important;
    }
    
    /* Summary card lebih compact */
    .modal-extra-wide .summary-stat-card {
        padding: 15px !important;
    }
}

/* Mobile Portrait (<480px) - Full width */
@media (max-width: 480px) {
    .modal-extra-wide {
        max-width: 100% !important;
        width: 100% !important;
        padding: 15px !important;
        border-radius: 12px !important;
        margin: 10px auto !important;
    }
    
    /* Chart mobile */
    .modal-extra-wide .chart-container {
        height: 250px !important;
    }
    
    /* Icon & text lebih kecil */
    .modal-extra-wide .summary-icon {
        font-size: 2rem !important;
    }
    
    .modal-extra-wide .summary-value {
        font-size: 1.5rem !important;
    }
    
    /* Table responsive */
    .modal-extra-wide .history-table {
        font-size: 0.9rem !important;
    }
    
    .modal-extra-wide .history-table th,
    .modal-extra-wide .history-table td {
        padding: 10px 8px !important;
    }
}

/* Extra Small Mobile (<360px) - Ultra compact */
@media (max-width: 360px) {
    .modal-extra-wide {
        padding: 12px !important;
    }
    
    .modal-extra-wide .chart-container {
        height: 220px !important;
    }
    
    .modal-extra-wide .summary-stat-card {
        padding: 12px !important;
    }
    
    .modal-extra-wide .summary-value {
        font-size: 1.3rem !important;
    }
}
/* ⭐ CHART RESPONSIVE - PERFECT HEIGHT FOR ALL DEVICES */

/* Desktop Besar (>1440px) - Chart tinggi */
.modal-extra-wide .chart-container {
    height: 450px !important;
    min-height: 400px !important;
}

/* Desktop Standard (1280px - 1440px) - Chart sedang */
@media (max-width: 1440px) {
    .modal-extra-wide .chart-container {
        height: 420px !important;
        min-height: 380px !important;
    }
}

/* Laptop Besar (1024px - 1280px) - Chart nyaman */
@media (max-width: 1280px) {
    .modal-extra-wide .chart-container {
        height: 400px !important;
        min-height: 350px !important;
    }
}

/* Laptop Standard & Tablet Landscape (768px - 1024px) - Chart pas */
@media (max-width: 1024px) {
    .modal-extra-wide .chart-container {
        height: 380px !important;
        min-height: 320px !important;
    }
}

/* Tablet Portrait (600px - 768px) - Chart compact */
@media (max-width: 768px) {
    .modal-extra-wide .chart-container {
        height: 350px !important;
        min-height: 300px !important;
    }
}

/* Mobile Landscape (480px - 600px) - Chart lebih kecil */
@media (max-width: 600px) {
    .modal-extra-wide .chart-container {
        height: 320px !important;
        min-height: 280px !important;
    }
}

/* Mobile Portrait (360px - 480px) - Chart mobile */
@media (max-width: 480px) {
    .modal-extra-wide .chart-container {
        height: 280px !important;
        min-height: 250px !important;
    }
}

/* Small Mobile (<360px) - Chart minimal */
@media (max-width: 360px) {
    .modal-extra-wide .chart-container {
        height: 250px !important;
        min-height: 220px !important;
    }
}

/* ⭐ CHART CANVAS - RESPONSIVE */
.modal-extra-wide .chart-container canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* Chart wrapper - ensure proper sizing */
.modal-extra-wide .chart-section {
    width: 100% !important;
    margin: 20px 0 !important;
}

/* Chart header spacing */
.modal-extra-wide .chart-header {
    margin-bottom: 15px !important;
}
/* ⭐ CHART PERFECT SIZE - PAS UNTUK SEMUA DEVICE */

/* Chart Container - Base styling */
.modal-extra-wide .chart-container {
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;  /* No horizontal scroll */
    margin: 20px 0 !important;
}

/* Chart Canvas - Responsive */
.modal-extra-wide .chart-container canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* ========== RESPONSIVE CHART HEIGHTS ========== */

/* Desktop Besar (>1600px) - Chart super tinggi */
@media (min-width: 1600px) {
    .modal-extra-wide .chart-container {
        height: 500px !important;
        min-height: 450px !important;
    }
}

/* Desktop Standard (1440px - 1600px) - Chart tinggi */
@media (min-width: 1440px) and (max-width: 1599px) {
    .modal-extra-wide .chart-container {
        height: 450px !important;
        min-height: 420px !important;
    }
}

/* Desktop/Laptop (1280px - 1440px) - Chart sedang-tinggi */
@media (min-width: 1280px) and (max-width: 1439px) {
    .modal-extra-wide .chart-container {
        height: 420px !important;
        min-height: 400px !important;
    }
}

/* Laptop Standard (1024px - 1280px) - Chart sedang */
@media (min-width: 1024px) and (max-width: 1279px) {
    .modal-extra-wide .chart-container {
        height: 400px !important;
        min-height: 380px !important;
    }
}

/* iPad Pro / Tablet Landscape (768px - 1024px) - Chart pas */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal-extra-wide .chart-container {
        height: 380px !important;
        min-height: 350px !important;
    }
}

/* iPad / Tablet Portrait (600px - 768px) - Chart nyaman */
@media (min-width: 600px) and (max-width: 767px) {
    .modal-extra-wide .chart-container {
        height: 350px !important;
        min-height: 320px !important;
    }
}

/* Mobile Landscape (480px - 600px) - Chart compact */
@media (min-width: 480px) and (max-width: 599px) {
    .modal-extra-wide .chart-container {
        height: 320px !important;
        min-height: 300px !important;
    }
}

/* Mobile Portrait (360px - 480px) - Chart mobile */
@media (min-width: 360px) and (max-width: 479px) {
    .modal-extra-wide .chart-container {
        height: 280px !important;
        min-height: 260px !important;
    }
}

/* Small Mobile (<360px) - Chart minimal */
@media (max-width: 359px) {
    .modal-extra-wide .chart-container {
        height: 250px !important;
        min-height: 230px !important;
    }
}

/* ========== CHART WRAPPER ========== */

.modal-extra-wide .chart-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* Chart Header */
.modal-extra-wide .chart-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    flex-wrap: wrap !important;
}

/* Chart Buttons - Responsive */
@media (max-width: 600px) {
    .modal-extra-wide .chart-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
}

/* ========== PREVENT OVERFLOW ========== */

.modal-extra-wide .modal-body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.modal-extra-wide {
    overflow-x: hidden !important;
}
/* ⭐ FIX CHART SPACING - PADDING PERFECT! */

/* Chart Section - Perfect spacing */
.modal-extra-wide .chart-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px 0 25px 0 !important;  /* Top margin lebih besar */
    padding: 0 !important;
    overflow: visible !important;
}

/* Chart Container - Remove bottom space */
.modal-extra-wide .chart-container {
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;  /* Remove margin */
    padding: 0 !important;  /* Remove padding */
}

/* Chart Header - Better spacing */
.modal-extra-wide .chart-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;  /* Space between header & chart */
    flex-wrap: wrap !important;
}

/* Chart Title */
.modal-extra-wide .chart-header h4,
.modal-extra-wide .chart-header .chart-title {
    margin: 0 !important;
    padding: 0 !important;
}

/* Chart Canvas - Tight fit */
.modal-extra-wide .chart-container canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;  /* Remove inline space */
    margin: 0 !important;
    padding: 0 !important;
}

/* Summary Stats - Space from chart */
.modal-extra-wide .history-summary-stats {
    margin-bottom: 25px !important;  /* Space before chart */
}

/* Riwayat Detail Section - Remove top space */
.modal-extra-wide .history-detail-section {
    margin-top: 20px !important;  /* Reduce space */
    padding-top: 0 !important;
}

/* Table Section - Tight to chart */
.modal-extra-wide .history-table-wrapper {
    margin-top: 15px !important;  /* Reduce gap */
}

/* Modal Body - Better padding */
.modal-extra-wide .modal-body {
    padding: 25px 30px !important;  /* Consistent padding */
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Chart Wrapper - No extra space */
.modal-extra-wide .chart-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

/* ========== RESPONSIVE SPACING ========== */

/* Desktop */
@media (min-width: 1024px) {
    .modal-extra-wide .chart-section {
        margin: 35px 0 25px 0 !important;
    }
    
    .modal-extra-wide .chart-header {
        margin-bottom: 25px !important;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal-extra-wide .chart-section {
        margin: 30px 0 20px 0 !important;
    }
    
    .modal-extra-wide .modal-body {
        padding: 20px 25px !important;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .modal-extra-wide .chart-section {
        margin: 25px 0 15px 0 !important;
    }
    
    .modal-extra-wide .chart-header {
        margin-bottom: 15px !important;
    }
    
    .modal-extra-wide .modal-body {
        padding: 18px 20px !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .modal-extra-wide .chart-section {
        margin: 20px 0 12px 0 !important;
    }
    
    .modal-extra-wide .modal-body {
        padding: 15px !important;
    }
}
/* ⭐ MOBILE MODAL FIX - LEBIH BESAR! */

/* Mobile Portrait (< 600px) - Modal lebih besar */
@media (max-width: 600px) {
    .modal-extra-wide {
        max-width: 95% !important;
        width: 95% !important;
        margin: 10px auto !important;
        padding: 20px !important;
        border-radius: 16px !important;
    }
    
    /* Summary Stats - 2 kolom di mobile */
    .modal-extra-wide .history-summary-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    /* Chart lebih tinggi di mobile */
    .modal-extra-wide .chart-container {
        height: 300px !important;
        min-height: 280px !important;
    }
    
    /* Modal body padding */
    .modal-extra-wide .modal-body {
        padding: 20px 18px !important;
    }
}

/* Small Mobile (< 480px) - Modal hampir full */
@media (max-width: 480px) {
    .modal-extra-wide {
        max-width: 98% !important;
        width: 98% !important;
        margin: 8px auto !important;
        padding: 18px !important;
    }
    
    /* Chart height */
    .modal-extra-wide .chart-container {
        height: 280px !important;
        min-height: 260px !important;
    }
    
    /* Summary card padding */
    .modal-extra-wide .summary-stat-card {
        padding: 14px !important;
    }
    
    /* Font sizes readable */
    .modal-extra-wide .summary-value {
        font-size: 1.6rem !important;
    }
    
    .modal-extra-wide .summary-label {
        font-size: 0.85rem !important;
    }
}

/* Extra Small Mobile (< 400px) - Full width */
@media (max-width: 400px) {
    .modal-extra-wide {
        max-width: 100% !important;
        width: 100% !important;
        margin: 5px auto !important;
        padding: 15px !important;
        border-radius: 12px !important;
    }
    
    /* Chart */
    .modal-extra-wide .chart-container {
        height: 260px !important;
        min-height: 240px !important;
    }
    
    /* Modal body */
    .modal-extra-wide .modal-body {
        padding: 16px 14px !important;
    }
}

/* iPhone 14 Pro Max (430px width) - Specific fix */
@media (max-width: 430px) and (min-width: 401px) {
    .modal-extra-wide {
        max-width: 98% !important;
        width: 98% !important;
        padding: 18px !important;
    }
    
    /* Chart perfect height */
    .modal-extra-wide .chart-container {
        height: 290px !important;
        min-height: 270px !important;
    }
    
    /* Summary stats - 2 kolom */
    .modal-extra-wide .history-summary-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    
    /* Font sizes */
    .modal-extra-wide .summary-value {
        font-size: 1.7rem !important;
    }
    
    .modal-extra-wide .summary-icon {
        font-size: 2.2rem !important;
    }
}

/* Mobile - Table responsive */
@media (max-width: 600px) {
    .modal-extra-wide .history-table {
        font-size: 0.9rem !important;
        overflow-x: auto !important;
    }
    
    .modal-extra-wide .history-table th,
    .modal-extra-wide .history-table td {
        padding: 12px 10px !important;
        white-space: nowrap !important;
    }
}

/* Mobile - Chart header responsive */
@media (max-width: 600px) {
    .modal-extra-wide .chart-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 18px !important;
    }
    
    .modal-extra-wide .chart-header h4 {
        font-size: 1.1rem !important;
    }
    
    /* Buttons smaller */
    .modal-extra-wide .chart-header button {
        font-size: 0.85rem !important;
        padding: 8px 14px !important;
    }
}

/* Mobile - Export button */
@media (max-width: 600px) {
    .modal-extra-wide .export-btn {
        font-size: 0.9rem !important;
        padding: 10px 16px !important;
    }
}
/* ⭐ TABLE SUPER BIG - MAKSIMAL SIZE! */

/* Riwayat Detail Section - Prominent */
.modal-extra-wide .history-detail-section {
    margin-top: 35px !important;
    padding-top: 25px !important;
    border-top: 2px solid #e5e7eb !important;
}

/* Section Header - BIGGER */
.modal-extra-wide .history-detail-section h4,
.modal-extra-wide .history-detail-section .section-title {
    font-size: 1.4rem !important;  /* Dari 1.25rem → 1.4rem */
    font-weight: 700 !important;
    margin-bottom: 25px !important;
    color: #111827 !important;
}

/* Table - SUPER BIG */
.modal-extra-wide .history-table {
    width: 100% !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 1.125rem !important;  /* 18px - BIGGER! */
    background: white !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Table Header - SUPER PROMINENT */
.modal-extra-wide .history-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.modal-extra-wide .history-table th {
    padding: 20px 28px !important;  /* BIGGER! */
    font-size: 1.15rem !important;  /* 18.4px */
    font-weight: 700 !important;
    text-align: left !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

/* Table Body - SPACIOUS */
.modal-extra-wide .history-table tbody tr {
    border-bottom: 1px solid #e5e7eb !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

.modal-extra-wide .history-table tbody tr:hover {
    background: #f0f9ff !important;
    transform: scale(1.01) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.modal-extra-wide .history-table td {
    padding: 24px 28px !important;  /* SUPER BIG! */
    font-size: 1.125rem !important;  /* 18px */
    color: #1f2937 !important;
    vertical-align: middle !important;
    line-height: 1.6 !important;
}

/* Date Column - BOLD */
.modal-extra-wide .history-table td:first-child {
    font-weight: 600 !important;
    color: #111827 !important;
    font-size: 1.15rem !important;
}

/* Weight Column - SUPER PROMINENT */
.modal-extra-wide .history-table td:nth-child(2) {
    font-weight: 700 !important;
    color: #3b82f6 !important;
    font-size: 1.35rem !important;  /* 21.6px - HUGE! */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Change Column - Color coded */
.modal-extra-wide .history-table td:nth-child(3) {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
}

.modal-extra-wide .history-table td:nth-child(3).positive {
    color: #10b981 !important;
}

.modal-extra-wide .history-table td:nth-child(3).negative {
    color: #ef4444 !important;
}

/* Action Buttons - BIG */
.modal-extra-wide .history-table .btn-delete,
.modal-extra-wide .history-table button {
    padding: 12px 20px !important;  /* BIGGER */
    font-size: 1.05rem !important;
    min-width: 100px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.modal-extra-wide .history-table .btn-delete:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

/* Export Button - SUPER PROMINENT */
.modal-extra-wide .export-btn {
    padding: 14px 32px !important;  /* BIGGER */
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    transition: all 0.2s ease !important;
}

.modal-extra-wide .export-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
}

/* ========== RESPONSIVE - STILL BIG ========== */

/* Desktop/Laptop (>768px) - MAXIMUM SIZE */
@media (min-width: 768px) {
    .modal-extra-wide .history-table th {
        padding: 22px 30px !important;
        font-size: 1.2rem !important;  /* 19.2px */
    }
    
    .modal-extra-wide .history-table td {
        padding: 26px 30px !important;
        font-size: 1.15rem !important;  /* 18.4px */
    }
    
    .modal-extra-wide .history-table td:nth-child(2) {
        font-size: 1.4rem !important;  /* 22.4px - MASSIVE! */
    }
}

/* Tablet (600-768px) - BIG */
@media (min-width: 600px) and (max-width: 767px) {
    .modal-extra-wide .history-table th {
        padding: 18px 22px !important;
        font-size: 1.1rem !important;
    }
    
    .modal-extra-wide .history-table td {
        padding: 20px 22px !important;
        font-size: 1.05rem !important;
    }
    
    .modal-extra-wide .history-table td:nth-child(2) {
        font-size: 1.25rem !important;
    }
}

/* Mobile (400-600px) - STILL READABLE */
@media (min-width: 400px) and (max-width: 599px) {
    .modal-extra-wide .history-table th {
        padding: 16px 14px !important;
        font-size: 1rem !important;
    }
    
    .modal-extra-wide .history-table td {
        padding: 18px 14px !important;
        font-size: 1rem !important;
    }
    
    .modal-extra-wide .history-table td:nth-child(2) {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
    }
    
    /* Keep all columns visible on mobile */
    .modal-extra-wide .history-table th,
    .modal-extra-wide .history-table td {
        display: table-cell !important;
    }
}

/* Small Mobile (<400px) - COMPACT BUT BIG ENOUGH */
@media (max-width: 399px) {
    .modal-extra-wide .history-table th {
        padding: 14px 10px !important;
        font-size: 0.95rem !important;
    }
    
    .modal-extra-wide .history-table td {
        padding: 16px 10px !important;
        font-size: 0.95rem !important;
    }
    
    .modal-extra-wide .history-table td:nth-child(2) {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
    }
    
    /* Hide only Catatan column */
    .modal-extra-wide .history-table th:nth-child(4),
    .modal-extra-wide .history-table td:nth-child(4) {
        display: none !important;
    }
}

/* Table Wrapper - Full width */
.modal-extra-wide .history-table-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    margin-top: 20px !important;
    border-radius: 8px !important;
}

/* Scrollbar - Bigger */
.modal-extra-wide .history-table-wrapper::-webkit-scrollbar {
    height: 10px !important;
}

.modal-extra-wide .history-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 5px !important;
}

.modal-extra-wide .history-table-wrapper::-webkit-scrollbar-thumb {
    background: #94a3b8 !important;
    border-radius: 5px !important;
}

.modal-extra-wide .history-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #64748b !important;
}

/* No data message - Bigger */
.modal-extra-wide .history-table .no-data {
    padding: 40px !important;
    font-size: 1.2rem !important;
    color: #6b7280 !important;
    text-align: center !important;
}