/* Baco Stok Takip - Açık Tema */

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

/* Navigation */
.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link svg {
    width: 20px;
    height: 20px;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-logout {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

/* Main Content */
.main {
    padding: 32px 0;
}

/* Page Title */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.card-body {
    padding: 24px;
}

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

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-icon.yellow {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Inventory Table */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th,
.inventory-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.inventory-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-table tr:hover {
    background: var(--bg-secondary);
}

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

.product-name {
    font-weight: 600;
    color: var(--text-primary);
}

.stock-value {
    font-weight: 600;
    font-size: 1.125rem;
}

.stock-value.positive {
    color: var(--success);
}

.stock-value.negative {
    color: var(--danger);
}

.stock-value.zero {
    color: var(--text-muted);
}

/* Action Buttons in Table */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-action.add {
    background: var(--success-light);
    color: var(--success);
}

.btn-action.add:hover {
    background: var(--success);
    color: white;
}

.btn-action.remove {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-action.remove:hover {
    background: var(--danger);
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn svg {
    width: 20px;
    height: 20px;
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* Radio & Checkbox Groups */
.radio-group {
    display: flex;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    font-weight: 500;
}

.radio-label:hover {
    background: var(--bg-tertiary);
}

.radio-label input {
    display: none;
}

.radio-label.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.radio-label.selected.green {
    border-color: var(--success);
    background: var(--success-light);
    color: var(--success);
}

.radio-label.selected.red {
    border-color: var(--danger);
    background: var(--danger-light);
    color: var(--danger);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    font-size: 2rem;
    margin: 0 auto 16px;
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

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

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

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

    .stat-card {
        padding: 16px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

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

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

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

    /* Header - Single row compact */
    .header {
        padding: 0;
    }

    .header-content {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0;
        gap: 8px;
    }

    .logo {
        font-size: 0.9rem;
        gap: 6px;
        flex-shrink: 0;
    }

    .logo span {
        display: none;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .logo-icon svg {
        width: 18px;
        height: 18px;
    }

    /* Navigation - Icons only */
    .nav {
        display: flex;
        gap: 2px;
        flex: 1;
        justify-content: center;
    }

    .nav-link {
        padding: 8px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        text-indent: -9999px;
        overflow: hidden;
        width: 40px;
        height: 40px;
    }

    .nav-link svg {
        width: 20px;
        height: 20px;
        text-indent: 0;
    }

    .nav-link.active {
        background: var(--primary-light);
        color: var(--primary);
    }

    /* User menu - minimal */
    .user-menu {
        gap: 4px;
        flex-shrink: 0;
    }

    .user-info {
        padding: 4px;
        background: transparent;
    }

    .user-info span {
        display: none;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .btn-logout {
        padding: 6px 8px;
        font-size: 0.7rem;
    }

    /* Main content */
    .main {
        padding: 16px 0;
    }

    .container {
        padding: 0 12px;
    }

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

    .page-subtitle {
        font-size: 0.875rem;
        margin-bottom: 16px;
    }

    /* Cards */
    .card-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .card-header .btn {
        width: 100%;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-title svg {
        width: 20px;
        height: 20px;
    }

    .card-body {
        padding: 12px;
    }

    /* Table responsive */
    .inventory-table th,
    .inventory-table td {
        padding: 10px 6px;
        font-size: 0.8rem;
    }

    .inventory-table th {
        font-size: 0.65rem;
        padding: 8px 4px;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .stock-value {
        font-size: 0.95rem;
    }

    .btn-action {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .action-buttons {
        gap: 4px;
    }

    /* Modal */
    .modal {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    /* Radio groups */
    .radio-group {
        gap: 8px;
    }

    .radio-label {
        padding: 10px 12px;
        font-size: 0.875rem;
    }

    /* Form elements */
    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px 12px;
        font-size: 0.9375rem;
    }

    /* Filter bar */
    .filter-bar {
        gap: 8px;
        flex-direction: column;
    }

    .filter-bar .form-input,
    .filter-bar .form-select {
        max-width: 100%;
        width: 100%;
    }

    /* Login page */
    .login-card {
        padding: 24px;
        margin: 10px;
    }

    .login-logo .logo-icon {
        width: 56px;
        height: 56px;
    }

    .login-logo h1 {
        font-size: 1.25rem;
    }

    /* Quantity input */
    .quantity-input button {
        width: 40px;
        height: 40px;
    }

    .quantity-input input {
        width: 60px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

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

    /* Table even more compact */
    .inventory-table th,
    .inventory-table td {
        padding: 8px 4px;
        font-size: 0.75rem;
    }

    .inventory-table th {
        font-size: 0.6rem;
    }

    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

/* Transactions List */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.transaction-item:hover {
    background: var(--bg-secondary);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.transaction-icon.giris {
    background: var(--success-light);
    color: var(--success);
}

.transaction-icon.cikis {
    background: var(--danger-light);
    color: var(--danger);
}

.transaction-details h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.transaction-details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.125rem;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

/* Quick Action Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-bar .form-input,
.filter-bar .form-select {
    max-width: 200px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover {
    background: var(--bg-tertiary);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Charts placeholder */
.chart-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

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

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

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

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

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

/* Quantity Input with Buttons */
.quantity-input {
    display: flex;
    align-items: center;
    gap: 0;
}

.quantity-input button {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quantity-input button:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

.quantity-input button:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
}

.quantity-input button:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.quantity-input input {
    width: 80px;
    height: 44px;
    border: 2px solid var(--border);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
}

.quantity-input input:focus {
    outline: none;
    border-color: var(--primary);
}
