/* frontend/assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --secondary: #f0f9ff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --font-sans: 'Inter', sans-serif;
    --transition: 0.2s ease-in-out;
}

.no-transition * {
    transition: none !important;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-sans); }

body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.5; -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4 { color: var(--text-main); font-weight: 600; }
p { color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-outline { background-color: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background-color: var(--bg-main); }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--text-main); }
.form-control {
    width: 100%;
    padding: 0.625rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: white;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--secondary); }

/* Login Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    padding: 1.5rem;
}
.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.3);
}

/* Dashboard Layout */
.app-container { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}
.sidebar-header { 
    min-height: 70px;
    padding: 1rem 1.5rem; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--primary);
    overflow: hidden;
}
.sidebar-nav { flex: 1; padding: 1.5rem 1rem; overflow-y: auto; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}
.nav-item:hover { background-color: var(--secondary); color: var(--primary); }
.nav-item.active { background-color: var(--primary); color: white; box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2); }
.sidebar-footer { 
    min-height: 70px;
    padding: 0.75rem 1rem; 
    border-top: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    background-color: var(--bg-card);
}
.sidebar-user-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-user-photo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0f2fe;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    background-color: #ff7a22;
}
.sidebar-user-name {
    display: block;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 105px;
}
.logout-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #ef4444;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.logout-link:hover {
    background-color: #fef2f2;
}
.logout-link i {
    width: 18px;
    height: 18px;
    color: #ef4444;
}

.main-content { flex: 1; margin-left: 260px; padding: 2rem; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.card { background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 1.5rem; margin-bottom: 1.5rem; }

/* Tabs System (Matching Image) */
.tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding: 0 0.5rem;
}
.tab-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.tab-item:hover { color: var(--primary); background-color: var(--secondary); }
.tab-item.active {
    color: white;
    background-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}
.tab-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease-in-out; }

/* Tables */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-weight: 600; color: var(--text-muted); font-size: 0.875rem; }

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

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-card); padding: 1.25rem; border-radius: var(--radius-md); border: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--secondary); color: var(--primary); display: flex; align-items: center; justify-content: center; }

@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .main-content { margin-left: 0; padding: 1rem; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease-out; }
.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 90%;
    max-width: 500px;
    position: relative;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-header h3 { margin: 0; }
.hidden { display: none !important; }

/* Force uppercase on general text inputs and textareas */
input[type="text"]:not([type="email"]):not([type="password"]),
input[type="search"],
textarea {
    text-transform: uppercase;
}

/* Force uppercase on lists, tables, options, and titles in UI */
.table td,
.search-results,
.search-item,
#sales-summary-container,
.tab-title,
.page-header h2,
.sidebar-client-name-title,
select,
select option,
.cart-item,
.totals,
.total-row {
    text-transform: uppercase;
}

.no-uppercase {
    text-transform: none !important;
}


