:root {
    --ivory: #f8f5f0;
    --sage: #a8b8a5;
    --taupe: #8a7f7a;
    --charcoal: #3c3c3c;
    --gold: #c8a97e;
    --light-gold: #e8d9c5;
    --light-sage: #d1d9cf;
    --dark-sage: #7a8c77;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--ivory);
    color: var(--charcoal);
    line-height: 1.6;
}

.min-vh-100 {
    min-height: 100vh;
}

/* Mobile First Approach */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Left Panel - Form Section */
.left-panel-section {
    background: linear-gradient(135deg, var(--sage) 0%, var(--taupe) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 50vh; /* Reduced for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.left-panel-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.left-panel-section > div {
    position: relative;
    z-index: 1;
    width: 100%;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-container label {
    color: var(--charcoal);
    font-weight: 500;
    font-size: 14px;
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.form-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.form-header p {
    color: var(--taupe);
    font-size: 14px;
}

/* Right Panel - Redesigned */
.right-panel-section {
    background: linear-gradient(to bottom, #fefefe 0%, #f8f5f0 100%);
    overflow-y: auto;
    position: relative;
    min-height: 50vh; /* Reduced for mobile */
    padding: 20px 0;
}

.right-panel-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(168, 184, 165, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(200, 169, 126, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(138, 127, 122, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.right-panel-content {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 20px 15px;
}

/* Quote Section - Enhanced */
.quote-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 16px;
    border-left: 5px solid var(--sage);
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.quote-section::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 100px;
    color: rgba(168, 184, 165, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-style: italic;
   line-height: 1.4;
    color: var(--charcoal);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.author {
    font-size: 14px;
    color: var(--taupe);
    text-align: right;
    font-weight: 500;
}

/* Prayer Cards Section */
.prayers-section {
    flex-grow: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    color: var(--charcoal);
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin: 0;
}

.section-title i {
    margin-right: 10px;
    color: var(--sage);
}

.prayer-count {
    background: var(--sage);
    color: white;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
}

.prayers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-height: none;
    overflow-y: visible;
    padding: 5px;
}

.prayer-card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prayer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.prayer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-direction: column;
    gap: 8px;
}

.prayer-date {
    font-size: 13px;
    color: var(--taupe);
    font-weight: 500;
}

.prayer-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
}

.prayer-status.pending {
    background-color: rgba(138, 127, 122, 0.1);
    border: 1px solid rgba(138, 127, 122, 0.2);
    color: var(--taupe);
}

.prayer-status.answered {
    background-color: rgba(168, 184, 165, 0.2);
    border: 1px solid rgba(168, 184, 165, 0.3);
    color: #2e5e2e;
}

.prayer-name {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 10px;
    font-size: 16px;
}

.prayer-preview {
    color: var(--taupe);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prayer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-prayer-btn {
    background: var(--sage);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    min-width: 44px;
}

.view-prayer-btn:hover {
    background: var(--taupe);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.prayer-icon {
    color: var(--gold);
    font-size: 14px;
}

.no-prayers-card {
    grid-column: 1 / -1;
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 2px dashed var(--light-sage);
}

.no-prayers-icon {
    font-size: 48px;
    color: var(--light-sage);
    margin-bottom: 15px;
}

.no-prayers-text {
    color: var(--taupe);
    font-size: 16px;
    margin-bottom: 0;
}

/* Form Elements */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--taupe);
    font-size: 14px;
}

.input-with-icon .form-control {
    padding: 12px 12px 12px 38px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px; /* Prevents zoom on iOS */
    transition: all 0.3s ease;
    background-color: #fcfcfc;
    min-height: 44px; /* Touch target size */
    width: 100%;
}

.input-with-icon .form-control:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(168, 184, 165, 0.1);
    background-color: white;
}

.input-with-icon textarea.form-control {
    min-height: 120px;
    resize: vertical;
    padding-top: 12px;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--taupe);
    margin-top: 4px;
}

.submit-btn {
    background: var(--charcoal);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    width: 100%;
    min-height: 44px; /* Touch target size */
}

.submit-btn:hover {
    background: var(--taupe);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Message Styles */
.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.message.success {
    background-color: rgba(168, 184, 165, 0.1);
    color: #2e5e2e;
    border-left: 4px solid var(--sage);
}

.message.error {
    background-color: rgba(200, 0, 0, 0.05);
    color: #a00;
    border-left: 4px solid #d44;
}

/* Modal Styles */
.prayer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    padding: 15px;
}

.prayer-modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid #e8e8e8;
}

.prayer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light-gold);
}

.prayer-modal-header h4 {
    margin: 0;
    color: var(--charcoal);
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--taupe);
    transition: color 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

.close-modal:hover {
    color: var(--charcoal);
}

.prayer-full-text {
    line-height: 1.6;
    color: var(--charcoal);
    font-size: 14px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid var(--sage);
    border-radius: 8px;
    white-space: pre-wrap;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-btn {
    background: var(--charcoal);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

.close-btn:hover {
    background: var(--taupe);
}

/* Login Styles */
.container.login-container {
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 30px 25px;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-icon {
    width: 70px;
    height: 70px;
    background-color: var(--sage);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 28px;
}

.login-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--charcoal);
}

.login-header p {
    color: var(--taupe);
    font-size: 16px;
}
.login-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--taupe);
    font-size: 14px;
}
.form-group {
    margin-bottom: 20px;
}

/* Sidebar and Main Layout */
.sidebar {
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--sage) 0%, var(--dark-sage) 100%);
    color: white;
    position: fixed;
    padding: 0;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.05);
}

.sidebar-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.6rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header h2 i {
    color: var(--light-gold);
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background-color: rgba(255,255,255,0.1);
    border-left: 4px solid var(--light-gold);
    padding-left: 25px;
}

.sidebar-nav a.active {
    background-color: rgba(255,255,255,0.15);
    border-left: 4px solid var(--gold);
    color: white;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* MAIN */

.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 10px;
    font-size: 24px;
}

.page-subtitle {
    color: var(--taupe);
    margin-bottom: 25px;
}

.table-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--light-sage);
    overflow-x: auto;
}

.table {
    min-width: 600px;
    width: 100%;
}

.table th {
    background-color: var(--light-sage);
    color: var(--charcoal);
    font-weight: 600;
    border-bottom: 2px solid var(--sage);
    padding: 12px;
}

.table td {
    padding: 12px;
    vertical-align: middle;
}

.answered-yes {
    color: #28a745;
    font-weight: 600;
}

.answered-no {
    color: #dc3545;
    font-weight: 600;
}

.view-btn, .notes-btn {
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

.view-btn {
    background: var(--sage);
    color: white;
}

.view-btn:hover {
    background: var(--dark-sage);
    color: white;
}

.notes-btn {
    background: #6c757d;
    color: white;
}

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

.modal-header {
    background-color: var(--light-sage);
    border-bottom: 1px solid var(--sage);
}

.modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--charcoal);
}

.btn-dark {
    background-color: var(--charcoal);
    border-color: var(--charcoal);
}

.btn-dark:hover {
    background-color: #2a2a2a;
    border-color: #2a2a2a;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--sage);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 44px;
    min-width: 44px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .min-vh-100 {
        min-height: 100vh;
    }
    .right-panel-section {
        min-height: 100vh;
        padding: 0;
    }

   

    .right-panel-content {
        padding: 30px;
    }

    .prayers-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        max-height: 65vh;
        overflow-y: auto;
    }

    .prayer-card {
        padding: 20px;
    }

    .prayer-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 0;
    }

    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .prayer-count {
        align-self: auto;
    }

    .sidebar {
        transform: translateX(0);
    }

    .main {
        margin-left: 280px;
        padding: 35px;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .login-card {
        padding: 40px;
    }

    .login-icon {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }

    .login-header h1 {
        font-size: 32px;
    }

    .page-title {
        font-size: 32px;
    }

    .table-card {
        padding: 25px;
    }

    .table th,
    .table td {
        padding: 15px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .prayers-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
   
}

/* Small Mobile Devices */
@media (max-width: 380px) {
    .quote {
        font-size: 16px;
    }
    
    .prayer-preview {
        font-size: 13px;
    }
    
    
    .prayer-card {
        padding: 15px;
    }
    
    .right-panel-content {
        padding: 15px 10px;
    }
    
    .login-card {
        padding: 25px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
}

/* Orientation-specific adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .left-panel-section {
        min-height: 100vh;
    }
    
    
    
    .prayers-grid {
        max-height: 50vh;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .prayer-card:hover {
        transform: none;
    }
}