/* ============================================================
   MINILICIOUS BAKERY - Social Media Planner
   Responsive, iPad-optimized, Apple Pencil Scribble-ready
   ============================================================ */

:root {
    --brand-brown: #4A2C17;
    --brand-dark: #2D1A0E;
    --brand-orange: #E8793A;
    --brand-gold: #D4A853;
    --cream: #FFFAF5;
    --warm-white: #FEFCF9;
    --blush: #FFF0E8;
    --soft-peach: #FFE8D6;
    --soft-blue: #E3F2FD;
    --soft-purple: #F3E5F5;
    --soft-green: #E8F5E9;
    --soft-gold: #FFF8E1;
    --soft-coral: #FCE4EC;
    --accent-blue: #1976D2;
    --accent-teal: #00897B;
    --dark-text: #2C2C2C;
    --med-text: #555555;
    --light-text: #888888;
    --border: #E0D6CC;
    --light-bg: #FAF7F4;
    --shadow: 0 2px 8px rgba(74, 44, 23, 0.08);
    --shadow-lg: 0 4px 16px rgba(74, 44, 23, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-bg);
    color: var(--dark-text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--brand-dark);
    background-image: radial-gradient(circle at 20% 80%, rgba(232, 121, 58, 0.08) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(212, 168, 83, 0.08) 0%, transparent 50%);
}

.login-card {
    background: var(--warm-white);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 380px;
    width: 90%;
}

.login-brand h1 {
    font-size: 32px;
    color: var(--brand-brown);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.login-bakery {
    font-size: 14px;
    color: var(--brand-brown);
    letter-spacing: 6px;
    opacity: 0.7;
}

.login-location {
    font-size: 11px;
    color: var(--brand-orange);
    margin-top: 8px;
    letter-spacing: 1px;
}

.login-card h2 {
    font-size: 16px;
    color: var(--med-text);
    font-weight: 400;
    margin: 24px 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input {
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.login-form input:focus {
    border-color: var(--brand-orange);
}

.login-form button {
    padding: 14px;
    background: var(--brand-brown);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-form button:hover {
    background: var(--brand-dark);
}

.login-error {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 12px;
    min-height: 18px;
}

/* ============================================================
   APP LAYOUT
   ============================================================ */

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app.hidden {
    display: none;
}

.app-header {
    background: var(--brand-brown);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-brand h1 {
    font-size: 16px;
    color: white;
    letter-spacing: 1px;
    white-space: nowrap;
}

.header-bakery {
    color: var(--brand-gold);
    font-weight: 400;
    font-size: 12px;
}

.header-tagline {
    font-size: 9px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}

.header-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-btn.active {
    background: var(--brand-orange);
    color: white;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.action-btn:hover {
    background: rgba(255,255,255,0.2);
}

.view-container {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================================
   ANNUAL VIEW
   ============================================================ */

.annual-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.annual-month-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.annual-month-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.annual-month-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-brown);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--brand-orange);
}

.annual-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.annual-day-header {
    font-size: 9px;
    font-weight: 600;
    color: var(--light-text);
    text-align: center;
    padding: 2px 0;
}

.annual-day {
    font-size: 10px;
    text-align: center;
    padding: 3px 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.annual-day:hover {
    background: var(--soft-peach);
}

.annual-day.posting {
    color: var(--brand-brown);
    font-weight: 600;
}

.annual-day.rest {
    color: var(--light-text);
}

.annual-day.bakery-holiday {
    background: var(--soft-peach);
    color: var(--brand-orange);
    font-weight: 700;
}

.annual-day.general-holiday {
    background: var(--soft-blue);
    color: var(--accent-blue);
    font-weight: 700;
}

.annual-day.today {
    background: var(--brand-orange);
    color: white;
    font-weight: 700;
    border-radius: 50%;
}

/* ============================================================
   MONTHLY VIEW
   ============================================================ */

.monthly-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.monthly-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-brown);
}

.month-nav-btn {
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--brand-brown);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.month-nav-btn:hover {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
}

.monthly-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.monthly-day-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-brown);
    text-align: center;
    padding: 10px 4px;
    background: var(--brand-brown);
    color: white;
    border-radius: 6px;
}

.monthly-day-cell {
    background: white;
    border-radius: 8px;
    padding: 8px;
    min-height: 100px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.monthly-day-cell:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.monthly-day-cell.empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.monthly-day-cell.posting {
    border-left: 3px solid var(--brand-orange);
}

.monthly-day-cell.rest {
    border-left: 3px solid var(--border);
}

.monthly-day-cell.bakery-holiday {
    background: var(--soft-peach);
}

.monthly-day-cell.general-holiday {
    background: var(--soft-blue);
}

.monthly-day-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-brown);
    margin-bottom: 4px;
}

.monthly-day-cell.rest .monthly-day-num {
    color: var(--light-text);
}

.monthly-day-info {
    font-size: 9px;
    color: var(--med-text);
    line-height: 1.4;
}

.monthly-day-info .holiday-name {
    color: var(--brand-orange);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.monthly-day-info .post-time {
    color: var(--brand-orange);
    font-weight: 600;
}

.monthly-day-info .platform {
    color: var(--med-text);
}

.monthly-day-note-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-gold);
}

/* ============================================================
   WEEKLY VIEW
   ============================================================ */

.weekly-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.weekly-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-brown);
}

.weekly-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
}

.weekly-day-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.weekly-day-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.weekly-day-card.posting {
    border-top: 3px solid var(--brand-orange);
}

.weekly-day-card.rest {
    border-top: 3px solid var(--border);
}

.weekly-day-card .day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.weekly-day-card .day-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-brown);
}

.weekly-day-card .day-date {
    font-size: 11px;
    color: var(--light-text);
}

.weekly-day-card .day-content {
    font-size: 11px;
    color: var(--med-text);
    line-height: 1.5;
}

.weekly-day-card .post-label {
    color: var(--brand-orange);
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 4px;
}

.weekly-day-card .rest-label {
    color: var(--light-text);
    font-style: italic;
    font-size: 11px;
}

/* ============================================================
   DAILY VIEW
   ============================================================ */

.daily-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.daily-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.daily-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-brown);
}

.daily-subtitle {
    font-size: 14px;
    color: var(--brand-orange);
    font-weight: 500;
}

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

.daily-schedule {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.daily-schedule h3 {
    font-size: 14px;
    color: var(--brand-brown);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-orange);
}

.schedule-slot {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 3px;
    font-size: 12px;
    gap: 12px;
}

.schedule-slot.even {
    background: var(--warm-white);
}

.schedule-slot.odd {
    background: var(--light-bg);
}

.schedule-slot.post-slot {
    background: var(--soft-peach);
    border: 1.5px solid var(--brand-orange);
    font-weight: 600;
}

.schedule-slot.task-slot {
    background: var(--soft-green);
    border: 1px solid var(--accent-teal);
}

.slot-time {
    font-weight: 600;
    color: var(--brand-brown);
    min-width: 65px;
    font-size: 11px;
}

.slot-content {
    color: var(--med-text);
    flex: 1;
}

.slot-content.post-content {
    color: var(--brand-orange);
    font-weight: 700;
}

.daily-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.daily-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.daily-card h3 {
    font-size: 14px;
    color: var(--brand-brown);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-orange);
}

.content-idea {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-brown);
    margin-bottom: 8px;
}

.content-platform {
    font-size: 11px;
    color: var(--med-text);
    margin-bottom: 8px;
}

.suggested-copy {
    font-size: 12px;
    color: var(--dark-text);
    background: var(--cream);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--brand-gold);
    margin-bottom: 10px;
    line-height: 1.5;
    font-style: italic;
}

.hashtags {
    font-size: 11px;
    color: var(--accent-blue);
    word-break: break-all;
}

/* Checklist */
.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

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

.checklist input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-orange);
    cursor: pointer;
}

.checklist label {
    cursor: pointer;
    flex: 1;
}

.checklist li.checked label {
    text-decoration: line-through;
    color: var(--light-text);
}

/* Notes area */
.notes-area {
    width: 100%;
    min-height: 120px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    background: white;
    line-height: 1.6;
}

.notes-area:focus {
    border-color: var(--brand-orange);
}

/* Holiday banner */
.holiday-banner {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.holiday-banner.bakery {
    background: var(--brand-orange);
    color: white;
}

.holiday-banner.general {
    background: var(--accent-blue);
    color: white;
}

/* ============================================================
   RESPONSIVE - iPad Portrait
   ============================================================ */

@media (max-width: 1024px) {
    .annual-view {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .weekly-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .daily-content {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .annual-view {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .weekly-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .monthly-day-cell {
        min-height: 70px;
        padding: 6px;
    }
    
    .monthly-day-info {
        font-size: 8px;
    }
    
    .view-container {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .annual-view {
        grid-template-columns: 1fr;
    }
    
    .weekly-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ============================================================
   UTILITY
   ============================================================ */

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-orange);
}

/* Print styles */
@media print {
    .app-header { display: none; }
    .view-container { padding: 0; max-width: 100%; }
}
