/* ============================================
   ALFUDU MODA - Üretim İhale ERP Sistemi
   Premium Dark Theme CSS
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient-hover: linear-gradient(135deg, #7b91f0 0%, #8a5fb5 100%);
    --success: #00c853;
    --success-bg: rgba(0, 200, 83, 0.15);
    --warning: #ffa726;
    --warning-bg: rgba(255, 167, 38, 0.15);
    --danger: #ef5350;
    --danger-bg: rgba(239, 83, 80, 0.15);
    --info: #29b6f6;
    --info-bg: rgba(41, 182, 246, 0.15);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --sidebar-width: 260px;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

/* === Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.sidebar-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}

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

.sidebar-nav a, .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover, .nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    border-left-color: var(--accent-primary);
}

.sidebar-nav a.active, .nav-link.active {
    color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.1);
    border-left-color: var(--accent-primary);
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-info .stars {
    font-size: 0.75rem;
}

/* === Navbar (Top) === */
.top-navbar {
    display: none;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(20px);
}

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

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === Grid System === */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* === Cards (Glassmorphism) === */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition);
    animation: fadeIn 0.5s ease;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* === Stat Cards === */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

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

.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #00e676;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #ff1744;
}

.btn-warning {
    background: var(--warning);
    color: #1a1a1a;
}

.btn-warning:hover {
    background: #ffb74d;
}

.btn-info {
    background: var(--info);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* === Forms === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

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

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-check label {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.input-group .form-control:last-child,
.input-group .btn:last-child {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-right: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.input-prefix + .form-control {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

/* === Tables === */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table thead {
    background: var(--bg-tertiary);
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-card);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-pending {
    background: rgba(156, 136, 255, 0.15);
    color: #9c88ff;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.15);
    color: var(--accent-primary);
}

/* === Alerts / Flash Messages === */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    animation: slideDown 0.4s ease;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(0, 200, 83, 0.3);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 83, 80, 0.3);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(255, 167, 38, 0.3);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: rgba(41, 182, 246, 0.3);
}

.alert-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 4px;
}

.alert-dismiss:hover {
    opacity: 1;
}

/* === Stars Rating === */
.stars {
    display: inline-flex;
    gap: 2px;
    font-size: 1rem;
}

.stars .star-filled {
    color: #ffd700;
}

.stars .star-empty {
    color: var(--text-muted);
}

.star-rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-rating-display .rating-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
}

/* Star Rating Input */
.star-input {
    display: flex;
    gap: 4px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-input input {
    display: none;
}

.star-input label {
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
    color: #ffd700;
}

.star-big {
    font-size: 3rem;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.rating-big-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffd700;
    line-height: 1;
}

.rating-distribution {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.rating-bar-fill {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill-inner {
    height: 100%;
    background: #ffd700;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* === Production Stage Stepper === */
.stage-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 0;
    position: relative;
    overflow-x: auto;
}

.stage-stepper::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: var(--bg-tertiary);
    z-index: 0;
}

.stage-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 70px;
}

.stage-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--bg-secondary);
    border: 3px solid var(--bg-tertiary);
    margin-bottom: 8px;
    transition: var(--transition);
    position: relative;
}

.stage-step.completed .stage-icon {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.4);
}

.stage-step.active .stage-icon {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.stage-step.upcoming .stage-icon {
    opacity: 0.4;
}

.stage-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 80px;
    line-height: 1.3;
}

.stage-step.completed .stage-label {
    color: var(--success);
}

.stage-step.active .stage-label {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Stage Buttons */
.stage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-secondary);
}

.stage-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.1);
}

.stage-btn.completed {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-bg);
}

.stage-btn.active {
    border-color: var(--accent-primary);
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stage-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* === Progress Bar === */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* === Page Header === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* === Tabs === */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-item {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.tab-badge {
    background: var(--accent-primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 50px;
    margin-left: 6px;
}

/* === Modals === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* === Image Gallery === */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

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

.gallery-main {
    width: 100%;
    max-height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-secondary);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gallery-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--accent-primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === File Upload === */
.file-upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-upload-text span {
    color: var(--accent-primary);
    font-weight: 600;
}

.upload-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.upload-preview-item {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
}

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

.upload-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Tags === */
.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.15);
    color: var(--accent-primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-remove {
    background: none;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 2px;
    opacity: 0.7;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-success {
    background: var(--success-bg);
    color: var(--success);
}

.tag-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.tag-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

/* === Finance Cards === */
.finance-card {
    text-align: center;
    padding: 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
}

.finance-card .stat-number {
    font-size: 1.8rem;
}

.finance-receivable {
    border-top: 3px solid var(--success);
}

.finance-receivable .stat-number {
    background: none;
    -webkit-text-fill-color: var(--success);
    color: var(--success);
}

.finance-payable {
    border-top: 3px solid var(--danger);
}

.finance-payable .stat-number {
    background: none;
    -webkit-text-fill-color: var(--danger);
    color: var(--danger);
}

.finance-payment {
    border-top: 3px solid var(--info);
}

.finance-payment .stat-number {
    background: none;
    -webkit-text-fill-color: var(--info);
    color: var(--info);
}

.finance-balance {
    border-top: 3px solid var(--accent-primary);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* === Contract Section === */
.contract-box {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 16px 0;
}

.contract-text {
    max-height: 200px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    border: 1px solid var(--glass-border);
}

/* === Landing Page / Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(ellipse at top, var(--bg-tertiary) 0%, var(--bg-primary) 70%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.1) 0%, transparent 70%);
    bottom: -200px;
    left: -100px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
}

.hero-logo {
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: 4px;
    animation: fadeIn 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeIn 1s ease 0.3s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1s ease 0.6s both;
}

.hero-buttons .btn {
    min-width: 180px;
    padding: 14px 32px;
    font-size: 1rem;
}

.hero-register {
    margin-top: 24px;
    animation: fadeIn 1s ease 0.9s both;
}

.hero-register a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-register a:hover {
    color: var(--accent-primary);
}

/* === Auth Pages === */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(ellipse at top, var(--bg-tertiary) 0%, var(--bg-primary) 70%);
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.6s ease;
}

.auth-card.wide {
    max-width: 600px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-title {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* === Inline Expandable Section === */
.expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.expandable.open {
    max-height: 2000px;
}

/* === Loading Spinner === */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* === Tooltip === */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--glass-border);
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* === Divider === */
.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 24px 0;
}

/* === Tender Detail Info === */
.tender-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.tender-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tender-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tender-info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* === Order Detail Row === */
.order-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

.order-detail-row:last-child {
    border-bottom: none;
}

.order-detail-label {
    color: var(--text-muted);
}

.order-detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* === Section Title === */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

/* === Quick Actions === */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.quick-action-card {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action-card:hover {
    border-color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.quick-action-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.quick-action-label {
    font-size: 0.85rem;
    font-weight: 600;
}

/* === Utilities === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--accent-primary) !important; }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.w-100 { width: 100%; }

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 15px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 0 25px rgba(102, 126, 234, 0.6); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

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

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

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

/* === Responsive === */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1100;
    }

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

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1050;
    }

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

    .top-navbar {
        display: block;
    }

    .hamburger {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .hero-logo {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .auth-card {
        padding: 24px;
    }

    .stage-stepper {
        padding: 16px 0;
        gap: 4px;
    }

    .stage-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .stage-label {
        font-size: 0.55rem;
    }

    .tender-info {
        grid-template-columns: 1fr;
    }

    .rating-overview {
        flex-direction: column;
        text-align: center;
    }

    .tabs {
        gap: 0;
    }

    .tab-item {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .quick-actions {
        flex-direction: column;
    }

    .modal {
        margin: 10px;
        max-height: 95vh;
    }

    .table th, .table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .main-content {
        padding: 16px 12px;
    }

    .card {
        padding: 16px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .hero-logo {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .stage-stepper {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .stage-step {
        min-width: 60px;
    }
}

/* === Print === */
@media print {
    .sidebar, .top-navbar, .hamburger, .btn, .page-actions {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card {
        border: 1px solid #ddd;
        background: #fff;
    }
}
