/* ===== GLOBAL STYLES ===== */
/* Basic reset and typography */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.hidden {
    display: none;
}

/* Global header styles */
.header {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #007bff;
    font-weight: 600;
}

.header h1 a {
    color: inherit;
    text-decoration: none;
}

.header h1 a:hover {
    color: inherit;
    text-decoration: none;
}

.header nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header nav a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Global main content */
.main-content {
    background: white;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Global footer styles */
.footer {
    background: #f8f9fa;
    padding: 2rem;
    margin: 3rem 0 0 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
    border-radius: 8px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content a:first-child {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-content a:first-child:hover {
    color: #007bff;
}

/* Global error and success messages */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.success-message {
    color: #28a745;
    font-size: 14px;
    margin-top: 10px;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
}

.login-page h1 {
    text-align: center;
    color: #333;
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
}

.login-page .form-group {
    margin-bottom: 20px;
}

.login-page .phone-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.login-page .country-selector {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px;
    position: relative;
}

.login-page .flag {
    width: 24px;
    height: 18px;
    margin-right: 8px;
    border-radius: 2px;
}

.login-page .country-code {
    font-weight: 500;
    color: #333;
    margin-right: 4px;
}

.login-page .phone-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
}

.login-page .phone-input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
}

.login-page .sms-message {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.login-page .verification-section {
    margin-bottom: 10px;
}

.login-page .verification-section h3 {
    color: #333;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
}

.login-page .otp-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
    letter-spacing: 2px;
    text-align: center;
}

.login-page .otp-input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
}

.login-page .otp-input.error {
    border-color: #dc3545;
    background: white;
}

.login-page .otp-input.error:focus {
    border-color: #dc3545;
}

.login-page .resend-section {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.login-page .resend-link {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.login-page .resend-link:hover {
    text-decoration: underline;
}

.login-page .submit-btn {
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin: 10px 0;
}

.login-page .submit-btn:hover {
    background: #0056b3;
}

.login-page .submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-page .terms-section {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    text-align: center;
}

.login-page .terms-section a {
    color: #007bff;
    text-decoration: none;
}

.login-page .terms-section a:hover {
    text-decoration: underline;
}

.login-page .result-message {
    margin-top: 10px;
    font-size: 14px;
}

/* Flag styles for login page */
.login-page .flag-us {
    background: linear-gradient(
        to bottom,
        #b22234 0%,
        #b22234 7.7%,
        #ffffff 7.7%,
        #ffffff 15.4%,
        #b22234 15.4%,
        #b22234 23.1%,
        #ffffff 23.1%,
        #ffffff 30.8%,
        #b22234 30.8%,
        #b22234 38.5%,
        #ffffff 38.5%,
        #ffffff 46.2%,
        #b22234 46.2%,
        #b22234 53.9%,
        #ffffff 53.9%,
        #ffffff 61.6%,
        #b22234 61.6%,
        #b22234 69.3%,
        #ffffff 69.3%,
        #ffffff 77%,
        #b22234 77%,
        #b22234 84.7%,
        #ffffff 84.7%,
        #ffffff 92.4%,
        #b22234 92.4%,
        #b22234 100%
    );
    position: relative;
}

.login-page .flag-us::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 54%;
    background: #002868;
    border-radius: 1px;
}

/* ===== LANDING PAGE STYLES ===== */
.landing-page {
    padding: 0;
}

/* Header Login Button */
.login-btn {
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.login-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Hero Section */
.landing-page .hero {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin: 0 0 3rem 0;
    border-radius: 8px;
}

.landing-page .hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.landing-page .hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 2rem 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.landing-page .cta-button {
    display: inline-block;
    background: white;
    color: #007bff;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.landing-page .cta-button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.landing-page .cta-button.secondary {
    background: #007bff;
    color: white;
    border: 2px solid white;
}

.landing-page .cta-button.secondary:hover {
    background: white;
    color: #007bff;
}

/* Features Section */
.landing-page .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.landing-page .feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.landing-page .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.1);
    background: white;
}

.landing-page .feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.landing-page .feature-card h3 {
    color: #333;
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.landing-page .feature-card p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* CTA Section */
.landing-page .cta-section {
    background: #f8f9fa;
    padding: 4rem 2rem;
    text-align: center;
    margin: 3rem 0 0 0;
    border-top: 1px solid #e9ecef;
    border-radius: 8px;
}

.landing-page .cta-content h2 {
    color: #333;
    font-size: 2rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.landing-page .cta-content p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0 0 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== APP/DASHBOARD PAGE STYLES ===== */
.app-page .dashboard-section {
    margin-bottom: 2rem;
}

.app-page .section-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 12px 0px 12px;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-page .section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #495057;
}

.app-page .add-btn {
    background: #28a745;
    color: white;
    border: 1px solid #28a745;
    text-decoration: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-page .add-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

/* Button styles for navigation */
.back-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.back-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.settings-btn {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.settings-btn:hover {
    background: #5a6268;
    color: white;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.logout-btn:hover {
    background: #c82333;
}

/* ===== TABLE STYLES ===== */
.reminders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reminders-table thead {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.reminders-table th {
    padding: 1rem 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reminders-table th:first-child,
.reminders-table td:first-child {
    width: 80px;
    padding-left: 8px;
}

.reminders-table th:nth-child(2),
.reminders-table td:nth-child(2) {
    width: 60px;
    text-align: center;
}

.reminders-table th:nth-child(3),
.reminders-table td:nth-child(3) {
    width: 60px;
    text-align: center;
}

.reminders-table th:nth-child(4),
.reminders-table td:nth-child(4) {
    width: 70px;
    text-align: center;
}

.reminders-table th:last-child,
.reminders-table .actions-cell {
    width: 90px;
    text-align: center;
}

.reminders-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.reminders-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.reminders-table tbody tr:hover {
    background: #e3f2fd;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.reminders-table td {
    padding: 1rem 0.5rem;
    vertical-align: middle;
    border: none;
}

.reminders-table td:first-child {
    font-weight: 600;
    color: #007bff;
}

.reminders-table td:nth-child(2) {
    color: #6c757d;
    font-weight: 500;
}

.reminders-table td:nth-child(3) {
    color: #495057;
    font-size: 0.9rem;
}

.reminders-table td:nth-child(4) {
    font-weight: 600;
    color: #28a745;
}

.reminders-table .actions-cell {
    white-space: nowrap;
    padding: 0.5rem 0rem;
}

.reminders-table .edit-link {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.6rem;
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
    border: 2px solid transparent;
}

.reminders-table .edit-link:hover {
    background: #007bff;
    color: white;
    transform: scale(1.15) translateY(-2px);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.reminders-table .delete-btn {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 2px solid transparent;
    font-size: 1rem;
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reminders-table .delete-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.15) translateY(-2px);
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.reminders-table .size-6 {
    width: 18px;
    height: 18px;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.submit-btn:hover {
    background: #0056b3;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Settings page styles */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h2 {
    margin: 1rem 0 1rem 0;
    font-size: 1.5rem;
    color: #007bff;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    margin: 0.5rem 0;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 12px 6px 6px 6px;
    }

    .settings-section {
        padding: 0 1rem;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .landing-page .hero {
        padding: 3rem 1.5rem;
        margin: 0 0 2rem 0;
    }

    .landing-page .hero-content h1 {
        font-size: 2rem;
    }

    .landing-page .hero-subtitle {
        font-size: 1.1rem;
    }

    .landing-page .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .landing-page .feature-card {
        padding: 1.5rem 1rem;
    }

    .landing-page .cta-section {
        padding: 3rem 1.5rem;
        margin: 2rem 0 0 0;
    }

    .landing-page .cta-content h2 {
        font-size: 1.5rem;
    }

    /* Mobile table responsiveness */
    .reminders-table {
        font-size: 0.85rem;
    }

    .reminders-table th,
    .reminders-table td {
        padding: 0.75rem 0.25rem;
    }

    .reminders-table th {
        font-size: 0.8rem;
    }

    .reminders-table .size-6 {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .landing-page .hero {
        padding: 2rem 1rem;
    }

    .landing-page .hero-content h1 {
        font-size: 1.75rem;
    }

    .landing-page .hero-subtitle {
        font-size: 1rem;
    }

    .landing-page .cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Keep table format on mobile with smaller text and padding */
    .reminders-table {
        min-width: 100%;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }

    .reminders-table thead,
    .reminders-table tbody,
    .reminders-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .reminders-table thead {
        width: 100%;
    }

    .reminders-table tr {
        display: table-row;
    }

    .reminders-table th,
    .reminders-table td {
        display: table-cell;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (min-width: 768px) {
    .header {
        padding: 1.5rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .app-page .dashboard-section,
    .settings-section {
        padding: 0 1rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}
