/* DayByDayProject Premium Stylesheet — Coffely Design Language Edition */

:root {
    --bg-primary: #192028;       /* Deep dark background */
    --bg-secondary: #212c37;     /* Coffely dark slate blue */
    --bg-tertiary: #2a3847;      /* Active state/Hover/Input background */
    --text-primary: #eef2f7;     /* Crisp white text */
    --text-secondary: #97a9bd;   /* Subtle slate gray-blue */
    --text-muted: #647a90;       /* Muted caption text */
    
    --accent: #78a9c2;           /* Ice Blue / Accent color */
    --accent-hover: #5d92ac;
    --accent-gradient: linear-gradient(135deg, #78a9c2 0%, #518ba7 100%);
    
    --success: #78a9c2;          /* Ice blue accent */
    --warning: #e87a6c;          /* Coral warning accent */
    --danger: #e56353;           /* Coral danger accent */
    
    --glass-bg: #212c37;
    --glass-border: rgba(255, 255, 255, 0.06);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.25);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent);
}

/* Glassmorphism/Card elements */
.glass-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Header & Footer */
header {
    background: #1c252f;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-text {
    font-weight: 500;
}

.brand-accent-1 {
    color: var(--warning);
}

.brand-accent-2 {
    color: var(--accent);
}

.logo-icon {
    width: 1.5rem;
    height: 1.5rem;
    background: var(--accent-gradient);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
}

/* Buttons (Pill shaped like Coffely UI elements) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: #141a20;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(120, 169, 194, 0.25);
}

.btn-primary:hover {
    background: #8cbcd6;
    color: #141a20;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(120, 169, 194, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(229, 99, 83, 0.25);
}

.btn-danger:hover {
    background: #e04e3e;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(229, 99, 83, 0.35);
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(120, 169, 194, 0.15);
    background-color: rgba(255, 255, 255, 0.04);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Grid layout */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Admin Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .admin-layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* Dashboard styles */
.dashboard-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

h1, h2, h3 {
    font-weight: 300; /* Thinner weights for elegant modern look */
    letter-spacing: -0.02em;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-header {
    margin-bottom: 1.25rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.project-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .project-footer > * {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 100px;
        text-align: center;
    }
    .project-footer form {
        display: block !important;
        flex: 1 1 100%;
    }
    .project-footer form .btn {
        width: 100%;
    }
}

/* Copy fields */
.copy-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.copy-input {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.5rem;
    min-width: 0;
}

/* Pin display */
.pin-badge {
    background: rgba(120, 169, 194, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: monospace;
    font-size: 0.95rem;
    border: 1px solid rgba(120, 169, 194, 0.15);
}

/* Vertical Timeline */
.timeline-header {
    text-align: center;
    padding: 4rem 0 3rem;
    background: radial-gradient(circle at top, rgba(120, 169, 194, 0.1) 0%, rgba(25, 32, 40, 0) 70%);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 11px;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

/* Circular ring indicator like Coffely */
.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.25rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(120, 169, 194, 0.15);
}

.timeline-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline-marker.weather {
    border-color: var(--warning);
    box-shadow: 0 0 0 4px rgba(232, 122, 108, 0.15);
}

.timeline-marker.weather::after {
    background: var(--warning);
}

.timeline-marker.other {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(229, 99, 83, 0.15);
}

.timeline-marker.other::after {
    background: var(--danger);
}

.timeline-content {
    animation: fadeInUp 0.5s ease forwards;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-weight: 500;
}

.timeline-status.work_done {
    background: rgba(120, 169, 194, 0.1);
    color: var(--accent);
}

.timeline-status.no_work_weather {
    background: rgba(232, 122, 108, 0.1);
    color: var(--warning);
}

.timeline-status.no_work_other {
    background: rgba(229, 99, 83, 0.1);
    color: var(--danger);
}

.timeline-text {
    font-size: 1.05rem;
    font-weight: 300; /* Thin text like in Coffely UI */
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

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

.photo-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    background-color: var(--bg-primary);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-item:hover {
    transform: scale(1.02);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Photo Upload / Circular drink slots style */
.photo-upload-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.photo-uploader {
    position: relative;
    width: 105px;
    height: 105px;
    border: 2px dashed rgba(120, 169, 194, 0.3);
    border-radius: 50%; /* Circular drink slot shape */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.2s;
    overflow: hidden;
}

.photo-uploader:hover {
    border-color: var(--accent);
    background-color: rgba(120, 169, 194, 0.05);
}

.photo-uploader-icon {
    font-size: 1.35rem;
    margin-bottom: 0.15rem;
}

.photo-uploader-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
}

.photo-uploader input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 10;
    border-radius: 50%;
}

.photo-remove {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    background-color: var(--danger);
    color: white;
    border: none;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 20;
    box-shadow: var(--shadow-sm);
}

/* Offline Banner */
.offline-banner {
    background-color: var(--warning);
    color: var(--bg-primary);
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 32, 40, 0.96);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent);
    color: #141a20;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    animation: fadeInUp 0.3s ease;
}

.toast.error {
    background: var(--danger);
    color: white;
}

/* Print Styling */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    header, .btn, .lightbox, .toast, .no-print {
        display: none !important;
    }
    .timeline::before {
        background: #cbd5e1 !important;
    }
    .timeline-marker {
        background: white !important;
        border-color: #475569 !important;
        box-shadow: none !important;
        print-color-adjust: exact;
    }
    .timeline-status {
        border: 1px solid #cbd5e1;
        print-color-adjust: exact;
    }
    .glass-card {
        background: none !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        color: black !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .user-info-text {
        display: none !important;
    }
    
    header {
        padding: 0.75rem 0 !important;
    }
    
    .logo {
        font-size: 1.2rem !important;
    }
    
    .logo-icon {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    
    .btn {
        padding: 0.6rem 1.25rem !important;
        font-size: 0.85rem !important;
    }

    .copy-group .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
    
    main {
        padding: 1rem 0 !important;
    }
    
    .glass-card {
        padding: 1.5rem !important;
    }
}

/* Custom modal styles */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.custom-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 32, 40, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.custom-modal-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    z-index: 10;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(229, 99, 83, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header User Profile Link Hover Effect */
.user-info-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    color: var(--text-secondary) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-info-link:hover {
    color: var(--text-primary) !important;
    background-color: rgba(229, 99, 83, 0.08);
    border-color: rgba(229, 99, 83, 0.2);
    box-shadow: 0 4px 15px rgba(229, 99, 83, 0.15);
    transform: translateY(-1.5px);
}

.user-info-link svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.user-info-link:hover svg {
    transform: scale(1.15);
    stroke: var(--danger) !important;
    filter: drop-shadow(0 0 4px rgba(229, 99, 83, 0.6));
}

/* Authentication Page Link Transitions */
.auth-switch-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-switch-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--danger);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.auth-switch-link:hover {
    color: var(--danger);
    text-shadow: 0 0 8px rgba(229, 99, 83, 0.4);
}

.auth-switch-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Navigation link item hover */
.nav-link-item {
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding: 0.3rem 0;
}

.nav-link-item::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1.5px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-link-item:hover {
    color: var(--text-primary) !important;
}

.nav-link-item:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 60;
    transition: transform 0.2s ease;
}

.hamburger-btn:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(25, 32, 40, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mobile-menu-close:hover {
    color: var(--danger);
}

/* Mobile Menu Navigation Links */
.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.mobile-menu-nav .nav-link-item {
    font-size: 1.1rem;
    width: 100%;
}

.mobile-menu-nav .user-info-link {
    width: fit-content;
    margin-top: 0.5rem;
}

.mobile-menu-nav .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Body lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Pulsing scale animation for checkout success icons */
@keyframes pulseScale {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(120, 169, 194, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(120, 169, 194, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(120, 169, 194, 0);
    }
}
