/* =============================================
   StokTakip — Corporate Soft Design System
   ============================================= */

:root {
    --st-primary: #4361ee;
    --st-primary-soft: #eef0fd;
    --st-primary-dark: #3451d1;
    --st-sidebar-bg: #1e2d4f;
    --st-sidebar-hover: #273d66;
    --st-sidebar-active: #4361ee;
    --st-surface: #f4f6fb;
    --st-card: #ffffff;
    --st-border: #e4e9f2;
    --st-text: #1e293b;
    --st-text-muted: #64748b;
    --st-success: #22c55e;
    --st-warning: #f59e0b;
    --st-danger: #ef4444;
    --st-info: #06b6d4;
    --st-radius: 0.75rem;
    --st-radius-sm: 0.5rem;
    --st-shadow: 0 1px 4px rgba(30, 45, 79, .06), 0 4px 16px rgba(30, 45, 79, .08);
    --st-shadow-sm: 0 1px 3px rgba(30, 45, 79, .06);
    --st-transition: 0.18s ease;
}

/* ---- Base ---- */
html,
body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    background: var(--st-surface);
    color: var(--st-text);
    -webkit-font-smoothing: antialiased;
}

/* ---- Links & Buttons ---- */
a {
    color: var(--st-primary);
    text-decoration: none;
}

a:hover {
    color: var(--st-primary-dark);
}

.btn {
    font-weight: 500;
    font-size: 13px;
    border-radius: var(--st-radius-sm);
    padding: 0.45rem 1rem;
    transition: all var(--st-transition);
    border-width: 1.5px;
}

.btn-primary {
    background: var(--st-primary);
    border-color: var(--st-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--st-primary-dark);
    border-color: var(--st-primary-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(67, 97, 238, .35);
}

.btn-outline-primary {
    border-color: var(--st-primary);
    color: var(--st-primary);
}

.btn-outline-primary:hover {
    background: var(--st-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(67, 97, 238, .25);
}

.btn-outline-success:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, .2);
}

.btn-outline-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, .2);
}

.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, .18);
    border-color: var(--st-primary);
    outline: none;
}

/* ---- Cards ---- */
.card {
    border-radius: var(--st-radius) !important;
    border: 1px solid var(--st-border) !important;
    box-shadow: var(--st-shadow-sm) !important;
    background: var(--st-card);
}

.card.shadow-sm,
.card.shadow {
    box-shadow: var(--st-shadow) !important;
}

/* ---- Tables ---- */
.table {
    font-size: 13.5px;
    color: var(--st-text);
}

.table thead th {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--st-text-muted);
    background: #f8faff;
    border-bottom: 1px solid var(--st-border);
    padding: .75rem 1rem;
}

.table tbody td {
    padding: .75rem 1rem;
    vertical-align: middle;
    border-color: var(--st-border);
}

.table-hover tbody tr:hover {
    background: #f0f4ff;
}

.table-responsive {
    border-radius: var(--st-radius);
    overflow: hidden;
}

/* ---- Forms ---- */
.form-control,
.form-select {
    border-radius: var(--st-radius-sm);
    border-color: var(--st-border);
    font-size: 13.5px;
    color: var(--st-text);
    transition: border-color var(--st-transition), box-shadow var(--st-transition);
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--st-text-muted);
    margin-bottom: .35rem;
    letter-spacing: .02em;
}

/* ---- Badges ---- */
.badge {
    border-radius: .35rem;
    font-weight: 500;
    font-size: 11.5px;
    padding: .3em .65em;
}

/* ---- Sidebar ---- */
.st-sidebar {
    width: 252px;
    min-height: 100vh;
    background: var(--st-sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.st-sidebar-logo {
    padding: 1.4rem 1.25rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.st-sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--st-primary);
    border-radius: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.st-sidebar-logo .logo-text {
    line-height: 1.1;
}

.st-sidebar-logo .logo-text h6 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.st-sidebar-logo .logo-text small {
    color: #94a3b8;
    font-size: 11px;
}

.st-sidebar-nav {
    padding: 1rem .75rem;
    flex-grow: 1;
}

.st-nav-section {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #475569;
    padding: 1rem .5rem .4rem;
}

.st-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .75rem;
    border-radius: .55rem;
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--st-transition);
    text-decoration: none;
    margin-bottom: 2px;
}

.st-nav-link:hover {
    background: var(--st-sidebar-hover);
    color: #e2e8f0;
}

.st-nav-link.active {
    background: var(--st-sidebar-active);
    color: #fff;
    box-shadow: 0 4px 12px rgba(67, 97, 238, .4);
}

.st-nav-link.sub {
    padding-left: 2.4rem;
    font-size: 13px;
    color: #64748b;
}

.st-nav-link.sub:hover {
    color: #e2e8f0;
}

.st-nav-link.sub.active {
    background: rgba(67, 97, 238, .25);
    color: #a5b4fc;
    box-shadow: none;
}

.st-nav-link i {
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ---- Topbar ---- */
.st-topbar {
    height: 60px;
    background: var(--st-card);
    border-bottom: 1px solid var(--st-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.st-topbar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--st-text);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.st-topbar-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.st-user-chip {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 2rem;
    padding: .3rem .75rem .3rem .4rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--st-text);
}

.st-user-chip .avatar {
    width: 28px;
    height: 28px;
    background: var(--st-primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--st-primary);
    font-size: 14px;
}

.st-logout-btn {
    background: none;
    border: 1.5px solid #fca5a5;
    color: #ef4444;
    border-radius: var(--st-radius-sm);
    padding: .3rem .75rem;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: all var(--st-transition);
    cursor: pointer;
}

.st-logout-btn:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* ---- Main Layout ---- */
.st-main-content {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.st-page {
    padding: 1.75rem;
}

/* ---- Page Header ---- */
.st-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.st-page-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--st-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.st-page-header h3 i {
    color: var(--st-primary);
}

/* ---- Stat Cards ---- */
.stat-card {
    background: var(--st-card);
    border-radius: var(--st-radius);
    border: 1px solid var(--st-border);
    box-shadow: var(--st-shadow-sm);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--st-transition), box-shadow var(--st-transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--st-shadow);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card .stat-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--st-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.stat-card .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--st-text);
    line-height: 1.2;
    margin-top: .15rem;
}

/* ---- Modal ---- */
.modal-content {
    border: none !important;
    border-radius: var(--st-radius) !important;
    box-shadow: 0 20px 60px rgba(30, 45, 79, .18) !important;
}

.modal-header {
    border-bottom: 1px solid var(--st-border);
    padding: 1.25rem 1.5rem;
    background: #f8faff;
    border-radius: var(--st-radius) var(--st-radius) 0 0 !important;
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--st-text);
}

.modal-footer {
    border-top: 1px solid var(--st-border);
    padding: 1rem 1.5rem;
    background: #f8faff;
    border-radius: 0 0 var(--st-radius) var(--st-radius) !important;
}

.modal-body {
    padding: 1.5rem;
}

/* ---- Login Page ---- */
.st-login-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e2d4f 0%, #2d3f6b 50%, #4361ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.st-login-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 24px 64px rgba(30, 45, 79, .25);
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 420px;
}

.st-login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.st-login-logo .icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4361ee, #3451d1);
    border-radius: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(67, 97, 238, .35);
}

/* ---- Alerts ---- */
.alert {
    border-radius: var(--st-radius-sm);
    border: none;
    font-size: 13px;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* ---- Misc ---- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--st-success);
}

.invalid {
    outline: 1px solid var(--st-danger);
}

.validation-message {
    color: var(--st-danger);
    font-size: 12px;
}

code {
    background: var(--st-primary-soft);
    color: var(--st-primary);
    padding: .1em .45em;
    border-radius: .3rem;
    font-size: 12px;
}

h1:focus {
    outline: none;
}

#blazor-error-ui {
    background: #1e2d4f;
    bottom: 0;
    left: 0;
    right: 0;
    position: fixed;
    padding: .85rem 1.5rem;
    color: #e2e8f0;
    font-size: 13px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#blazor-error-ui a {
    color: #a5b4fc;
}

#blazor-error-ui .dismiss {
    margin-left: auto;
    cursor: pointer;
    opacity: .7;
}

#blazor-error-ui .dismiss:hover {
    opacity: 1;
}