:root {
    /* Zlatno-elegantna paleta inspirirana logom */
    --primary: #B8860B;
    --primary-light: #DAA520;
    --primary-dark: #8B6914;
    --accent: #D4AF37;
    --accent-light: #F4E4C1;
    
    /* Pozadine */
    --bg-main: #FFFEF9;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1C1410;
    
    /* Tekst */
    --text-primary: #2C2520;
    --text-secondary: #6B5D52;
    --text-light: #A89A8E;
    --text-inverse: #FFFEF9;
    
    /* Dodatno */
    --border: #E8DED0;
    --shadow-sm: 0 2px 12px rgba(184, 134, 11, 0.08);
    --shadow-md: 0 4px 20px rgba(184, 134, 11, 0.12);
    --shadow-lg: 0 8px 32px rgba(184, 134, 11, 0.16);
    
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    color: var(--text-inverse);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(180deg, #1C1410 0%, #2C2520 100%);
}

.logo {
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4C1 50%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.nav-menu {
    padding: 2rem 1rem;
    flex: 1;
}

.nav-item {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #D4AF37 0%, #F4E4C1 100%);
    transform: scaleY(0);
    transition: var(--transition);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-light);
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-light);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem 3rem;
    max-width: 1400px;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.page.active {
    display: block;
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.page-header h2 {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary span {
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 3rem;
    line-height: 1;
    filter: grayscale(0.3);
}

.stat-info h3 {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Orders List */
.orders-list {
    display: grid;
    gap: 1rem;
}

.order-card {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.order-card:hover::before {
    transform: scaleX(1);
}

.order-info h4 {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.order-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.order-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.order-actions {
    display: flex;
    gap: 0.75rem;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--text-secondary);
}

.icon-btn:hover {
    background: var(--accent-light);
    color: var(--primary);
}

.order-status {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-pending {
    background: linear-gradient(135deg, #FFF4E5 0%, #FFE8CC 100%);
    color: #C87A00;
    border: 1px solid #FFD699;
}

.status-completed {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

/* Search Input */
.search-input {
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    width: 300px;
    transition: var(--transition);
    font-family: 'Manrope', sans-serif;
    background: var(--bg-card);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    width: fit-content;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.filter-tab {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Calendar */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.calendar-controls h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
    color: var(--primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.calendar-day {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.calendar-day.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.calendar-day.has-orders::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.calendar-day.selected.has-orders::after {
    background: white;
}

.day-number {
    font-weight: 700;
    font-size: 1.125rem;
}

.day-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.calendar-day.selected .day-count {
    color: rgba(255, 255, 255, 0.8);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.selected-date-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.selected-date-section h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.note-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.note-card h4 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.note-card p {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.note-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Schedule List */
.schedule-list {
    display: grid;
    gap: 1rem;
}

.schedule-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.schedule-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.schedule-time {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 140px;
    box-shadow: var(--shadow-sm);
}

.schedule-time .date {
    font-weight: 700;
    font-size: 1.125rem;
}

.schedule-time .time {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.schedule-info {
    flex: 1;
}

.schedule-info h4 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.schedule-info p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Settings */
.settings-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.settings-section h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-item input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: 'Manrope', sans-serif;
    transition: var(--transition);
    background: var(--bg-card);
}

.setting-item input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 20, 16, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
    border: 2px solid var(--accent-light);
}

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

.modal-header {
    padding: 2rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
}

.modal-header h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    transition: var(--transition);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

#order-form,
#note-form,
#schedule-form {
    padding: 2rem;
}

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

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: 'Manrope', sans-serif;
    transition: var(--transition);
    background: var(--bg-card);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.items-section {
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    align-items: end;
    border: 1px solid var(--border);
}

.item-row input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: 'Manrope', sans-serif;
    background: white;
}

.remove-item-btn {
    background: #DC2626;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
}

.remove-item-btn:hover {
    background: #B91C1C;
    transform: scale(1.05);
}

.total-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.total-section h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: right;
}

#image-preview {
    margin-top: 1rem;
}

#image-preview img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border);
}

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

.modal-actions button {
    min-width: 120px;
}

/* Note Modal */
.note-modal {
    max-width: 600px;
}

.note-modal input,
.note-modal textarea {
    border: 2px solid var(--border);
    background: var(--bg-main);
}

.note-modal textarea {
    resize: vertical;
    min-height: 300px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .item-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        gap: 0.5rem;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .page-header .header-actions,
    .order-actions,
    .note-actions,
    .icon-btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page {
        page-break-inside: avoid;
    }
}

/* Dodatni elegantni detalji */
.recent-orders h3,
.selected-date-section h3,
.settings-section h3 {
    position: relative;
    padding-bottom: 0.75rem;
}

.recent-orders h3::after,
.selected-date-section h3::after,
.settings-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    border-radius: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}