/* Quran Memorization Planner Styles */

/* Universal box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.planner-hero,
.planner-main-content,
.planner-content,
.planner-section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Hero Section */
.planner-hero {
    background: linear-gradient(135deg, #1B5E20 0%, #0D47A1 100%);
    color: #fff;
    padding: 120px 20px 50px 20px;
    text-align: center;
}

.planner-hero .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    gap: 1rem; /* tighten vertical spacing between elements */
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    width: 100%;
}

.hero-text h1 {
    font-size: 2.7rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

/* Mobile hero heading adjustments */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.9rem; /* reduce size on small screens */
        line-height: 1.25;
        word-break: normal;
        hyphens: auto;
        padding: 0 8px;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #e0f2f1;
    margin-bottom: 0;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem; /* tighten spacing between buttons */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.1rem; /* reduce gap below description */
}

.hero-actions .btn-primary,
.hero-actions .btn-outline {
    flex-shrink: 0;
}

/* Main Content Layout */
.planner-main-content {
    max-width: 1200px;
    margin: -40px auto 40px auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.planner-main-content .container {
    display: grid;
    grid-template-columns: 200px 1fr 240px; /* narrower sidebars to widen center */
    gap: 1.75rem;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Ensure proper desktop layout */
@media (min-width: 1025px) {
    .planner-main-content .container {
        display: grid;
        grid-template-columns: 200px 1fr 240px; /* desktop */
        gap: 1.75rem;
    }
    
    .planner-toc {
        grid-column: 1;
        position: sticky;
        top: 120px;
    }
    
    .planner-content {
        grid-column: 2;
    }
    
    .planner-sidebar {
        grid-column: 3;
    }
}

.planner-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    padding: 2.5rem;
    grid-column: 2;
    min-height: 500px;
}

.planner-toc {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    padding: 1.2rem 1rem;
    margin-top: 24px;
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    grid-column: 1;
}

.planner-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    padding: 1.2rem 1rem;
    margin-top: 24px;
    grid-column: 3;
}

/* Section Styling */
.planner-section {
    margin-bottom: 3rem;
}

.planner-section h2 {
    color: #1B5E20;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.planner-section h3 {
    color: #0D47A1;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.planner-section p {
    color: #444;
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

/* Table of Contents */
.planner-toc h3 {
    color: #0D47A1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.planner-toc ul {
    list-style: none;
    padding-left: 0;
}

.planner-toc li {
    margin-bottom: 0.9rem;
}

.planner-toc a {
    color: #0D47A1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.planner-toc a:hover {
    color: #1B5E20;
}

/* Mobile Table of Contents */
.planner-toc-mobile {
    display: none;
    margin-bottom: 1rem;
}

.toc-toggle {
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0D47A1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.toc-toggle:hover {
    background: #e9ecef;
    border-color: #1B5E20;
}

.toc-toggle i:first-child {
    margin-right: 0.5rem;
}

.toc-toggle i:last-child {
    transition: transform 0.3s;
}

.toc-toggle.active i:last-child {
    transform: rotate(180deg);
}

.toc-mobile-content {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toc-mobile-content.active {
    display: block;
}

.toc-mobile-content li {
    border-bottom: 1px solid #f0f0f0;
}

.toc-mobile-content li:last-child {
    border-bottom: none;
}

.toc-mobile-content a {
    display: block;
    padding: 1rem;
    color: #0D47A1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.toc-mobile-content a:hover {
    background: #f8f9fa;
    color: #1B5E20;
}

/* Form Styling */
.planner-form {
    margin-top: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1B5E20;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.form-help {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Info Button Styles */
.info-btn {
    background: none;
    border: none;
    color: #4CAF50;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.info-btn:hover {
    color: #1B5E20;
}

.info-btn i {
    font-size: 0.9rem;
}

/* Tooltip Styles */
.info-btn[data-tooltip] {
    position: relative;
}

.info-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    transform: none;
    background: #1B5E20;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: normal;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 360px; /* wider, less tall */
    text-align: left;
    line-height: 1.5;
}

.info-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 10px;
    transform: none;
    border: 5px solid transparent;
    border-top-color: #1B5E20;
    z-index: 1000;
    margin-bottom: 0;
}

/* Toggle and Radio Groups */
.toggle-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.toggle-label input[type="radio"] {
    margin: 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: #1B5E20;
    background-color: rgba(27, 94, 32, 0.05);
}

.radio-label input[type="radio"]:checked + span {
    color: #1B5E20;
    font-weight: 600;
}

.radio-label input[type="radio"]:checked ~ small {
    color: #0D47A1;
}

.radio-label input[type="radio"] {
    margin: 0;
}

/* Checkbox Groups */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #c8e6c9;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    display: inline-block;
    position: relative;
    background: #fff;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -58%);
    font-size: 14px;
    color: #fff;
    line-height: 1;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    background: linear-gradient(135deg, #1B5E20 0%, #4CAF50 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
}

.btn-secondary {
    background: #0D47A1;
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.btn-secondary:hover {
    background: #1565C0;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #0D47A1;
    border: 2px solid #0D47A1;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.btn-outline:hover {
    background: #0D47A1;
    color: white;
    transform: translateY(-2px);
}

/* Special styling for hero section outline button */
.planner-hero .btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.planner-hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-link {
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.btn-link:hover {
    color: #1B5E20;
}

/* Plan Summary */
.plan-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #1B5E20;
}

.plan-summary h3 {
    color: #1B5E20;
    margin-bottom: 1rem;
}

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

.summary-item {
    text-align: center;
}

.summary-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0D47A1;
}

.summary-item .label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Plan Preview */
.plan-preview {
    margin-bottom: 2rem;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.preview-table th,
.preview-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.preview-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1B5E20;
}

.preview-table tr:hover {
    background: #f8f9fa;
}

.review-badges {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.review-badge {
    background: #0D47A1;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tip-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.tip-card h3 {
    color: #1B5E20;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.tip-card p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Usage List */
.usage-list {
    list-style: none;
    padding-left: 0;
}

.usage-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    color: #444;
    font-size: 1.08rem;
    line-height: 1.6;
}

.usage-list li:last-child {
    border-bottom: none;
}

.usage-list strong {
    color: #1B5E20;
}

/* Sidebar */
.sidebar-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    color: #1B5E20;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sidebar-links {
    list-style: none;
    padding-left: 0;
}

.sidebar-links li {
    margin-bottom: 0.75rem;
}

.sidebar-links a {
    color: #0D47A1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.sidebar-links a:hover {
    color: #1B5E20;
}

.sidebar-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Download Section */
.download-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

/* Preview Actions */
.preview-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .planner-main-content .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .planner-toc {
        grid-column: 1;
        position: static;
        margin-top: 0;
        order: 2;
    }
    
    .planner-content {
        grid-column: 1;
        order: 1;
    }
    
    .planner-sidebar {
        grid-column: 1;
        order: 3;
    }
}

@media (max-width: 768px) {
    /* Prevent horizontal scroll on mobile */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .planner-hero {
        padding: 100px 15px 40px 15px;
    }
    
    .hero-content {
        gap: 1.25rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.25rem;
        width: 100%;
    }
    
    .hero-actions .btn-primary,
    .hero-actions .btn-outline {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .planner-main-content {
        margin: -30px 8px 30px 8px;
    }
    
    .planner-main-content .container {
        gap: 1rem;
        padding: 0;
    }
    
    .planner-content {
        padding: 1.25rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .planner-section {
        padding: 1rem 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Images - prevent overflow */
    .planner-section img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Lists - prevent overflow */
    .planner-section ul {
        padding-left: 20px;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .planner-section ul li {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .planner-toc {
        display: none;
    }
    
    .planner-toc-mobile {
        display: block;
    }
    
    .planner-sidebar {
        margin-top: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tables - make scrollable on mobile */
    .preview-table {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .preview-table table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-content {
        gap: 1rem;
    }
    
    .hero-actions {
        margin-top: 0;
    }
    
    .planner-content {
        padding: 1rem;
        margin: 0 10px;
    }
    
    .planner-main-content {
        margin: -30px 10px 30px 10px;
    }
    
    .planner-main-content .container {
        gap: 0.75rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        gap: 1rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .form-group select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 1rem;
        padding-right: 2.5rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .hero-actions {
        width: 100%;
    }
    
    .hero-actions .btn-primary,
    .hero-actions .btn-outline {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .preview-table {
        font-size: 0.875rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .preview-table th,
    .preview-table td {
        padding: 0.5rem;
        min-width: 80px;
    }
    
    .preview-table th:first-child,
    .preview-table td:first-child {
        min-width: 100px;
    }
    
    .preview-table th:last-child,
    .preview-table td:last-child {
        min-width: 60px;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .summary-item .value {
        font-size: 1.25rem;
    }
    
    .summary-item .label {
        font-size: 0.8rem;
    }
    
    /* Additional mobile fixes */
    .planner-section {
        padding: 1rem 0.5rem;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* Images */
    .planner-section img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Text wrapping */
    h1, h2, h3, h4, h5, h6, p, li, span, strong {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto;
    }
    
    /* Lists */
    ul {
        padding-left: 18px;
        margin-right: 0;
        box-sizing: border-box;
    }
    
    /* Buttons */
    .download-actions {
        width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }
    
    .download-actions .btn-primary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal;
        line-height: 1.4;
        padding: 0.875rem 1rem;
    }
    
    /* Preview section mobile */
    #planner-preview-images {
        padding: 1.5rem 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
}

/* Print Styles for PDF */
@media print {
    .planner-hero {
        background: #1B5E20 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        background: #1B5E20 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .planner-toc,
    .planner-sidebar,
    .form-actions,
    .preview-actions {
        display: none !important;
    }
    
    .planner-main-content {
        grid-template-columns: 1fr !important;
        margin: 0 !important;
    }
    
    .planner-content {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Animation for smooth transitions */
.planner-section {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Preview Styles */
.plan-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.summary-item h3 {
    color: #1B5E20;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.summary-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.preview-table {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.preview-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-table th {
    background: #1B5E20;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.preview-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.preview-table tr:hover {
    background: #f8f9fa;
}

/* Weekly Schedule Styles */
.full-schedule-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.weekly-schedule-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.weekly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #4CAF50;
}

.weekly-header h4 {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.week-dates {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

.week-dates span {
    font-size: 0.9rem;
    color: #666;
    text-decoration: underline;
}

.weekly-table {
    margin-bottom: 1.5rem;
}

.weekly-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.weekly-table th {
    background: #0D47A1;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.weekly-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.weekly-table tr:hover {
    background: #f8f9fa;
}

.weekly-table td:first-child {
    font-weight: 600;
    color: #1B5E20;
}

.weekly-table td:nth-child(2) {
    color: #0D47A1;
    font-weight: 500;
}

.weekly-table td:nth-child(3) {
    color: #666;
    font-style: italic;
}

.weekly-table td:nth-child(4),
.weekly-table td:nth-child(5) {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.weekly-goals {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.weekly-goals h5 {
    color: #1B5E20;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.goals-box {
    min-height: 60px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #4CAF50;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-actions .btn-primary {
    background: #1B5E20;
    color: white;
}

.modal-actions .btn-primary:hover {
    background: #0D4A1A;
    transform: translateY(-2px);
}

.modal-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #f8f9fa;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #1B5E20;
}

/* Modal Schedule Content Styles */
.modal-schedule-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-schedule-summary h3 {
    color: #1B5E20;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

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

.modal-summary-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.modal-summary-item h4 {
    color: #1B5E20;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-summary-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-weekly-schedule {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.modal-weekly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #4CAF50;
}

.modal-weekly-header h4 {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-week-dates {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

.modal-week-dates span {
    font-size: 0.9rem;
    color: #666;
    text-decoration: underline;
}

.modal-weekly-table {
    margin-bottom: 1.5rem;
}

.modal-weekly-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-weekly-table th {
    background: #0D47A1;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.modal-weekly-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.modal-weekly-table tr:hover {
    background: #f8f9fa;
}

.modal-weekly-table td:first-child {
    font-weight: 600;
    color: #1B5E20;
}

.modal-weekly-table td:nth-child(2) {
    color: #0D47A1;
    font-weight: 500;
}

.modal-weekly-table td:nth-child(3) {
    color: #666;
    font-style: italic;
}

.modal-weekly-table td:nth-child(4),
.modal-weekly-table td:nth-child(5) {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.modal-weekly-goals {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.modal-weekly-goals h5 {
    color: #1B5E20;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.modal-goals-box {
    min-height: 60px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .modal-actions {
        width: 100%;
        justify-content: center;
    }

    .modal-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .modal-weekly-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .modal-week-dates {
        text-align: center;
    }

    .modal-weekly-table {
        overflow-x: auto;
    }
}

/* Loading Indicator Styles */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #1B5E20;
    font-weight: 600;
    margin-bottom: 1rem;
}

.loading-progress {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

