/* Shared design tokens + utility classes for the whole portal.
   Loaded before site.css / login.css / conditionsPageStyle.css so those
   files can still override where needed. */

:root {
    --brand-red: #b60003;
    --brand-red-dark: #8f0002;
    --brand-red-tint: #fdf0f0;
    --surface: #ffffff;
    --surface-elevated: rgba(255, 255, 255, 0.94);
    --surface-muted: #f7f7f8;
    --text-primary: #1f2328;
    --text-secondary: #5f6b7a;
    --border-color: #e3e6ea;
    --border-strong: #d4d9df;
    --radius-card: 12px;
    --radius-control: 8px;
    --radius-pill: 999px;
    --shadow-card: 0 2px 10px rgba(15, 23, 42, .06);
    --shadow-card-hover: 0 6px 20px rgba(15, 23, 42, .10);
    --shadow-modal: 0 24px 60px rgba(15, 23, 42, .18);
    --focus-ring: 0 0 0 4px rgba(182, 0, 3, .16);
    --content-max-width: 1360px;
    --font-sans: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--brand-red);
    transition: color .18s ease, opacity .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

    a:hover,
    a:focus {
        color: var(--brand-red-dark);
    }

button,
.btn,
.form-control,
input,
textarea,
select {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, opacity .18s ease, transform .18s ease;
}

.btn {
    min-height: 42px;
    font-weight: 600;
    letter-spacing: .01em;
}

.btn:focus,
.btn:focus-visible,
.form-control:focus,
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
    outline: none !important;
    box-shadow: var(--focus-ring) !important;
}

button[disabled],
.btn[disabled],
.btn:disabled,
.btn.disabled,
.form-control[disabled],
input[disabled] {
    cursor: not-allowed;
    opacity: .68;
}

.form-control,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"] {
    border-radius: var(--radius-control);
}

    .form-control::placeholder,
    input::placeholder,
    textarea::placeholder {
        color: #98a1ab;
    }

/* Button color hierarchy — shared across every page (Login uses old
   Bootstrap 3 which defaults .btn-info to cyan; _Layout pages used to
   force *every* .btn red via site.css, including Kapat/Geri buttons).
   Scoping to .btn-info/.btn-primary keeps primary actions on-brand while
   letting secondary/cancel actions read as secondary everywhere. */
.btn-info, .btn-primary {
    background-color: var(--brand-red) !important;
    color: #fff !important;
    border-color: var(--brand-red) !important;
    border-radius: var(--radius-control) !important;
}

    .btn-info:hover, .btn-info:focus, .btn-primary:hover, .btn-primary:focus {
        background-color: var(--brand-red-dark) !important;
        border-color: var(--brand-red-dark) !important;
    }

.btn-secondary {
    background-color: var(--surface-muted) !important;
    color: #495057 !important;
    border-color: var(--border-color) !important;
    border-radius: var(--radius-control) !important;
}

    .btn-secondary:hover, .btn-secondary:focus {
        background-color: var(--brand-red-tint) !important;
        color: var(--brand-red) !important;
        border-color: var(--brand-red) !important;
    }

/* Page heading — replaces repeated inline red card-header blocks used
   purely as a page title. */
.page-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px 0 20px;
    color: var(--text-primary);
}

    .page-heading h1 {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0;
    }

    .page-heading .page-heading-sub {
        color: var(--text-secondary);
        font-size: .9rem;
    }

/* Brand-colored card header, replaces:
   style="background-color:#b60003 !important;color:white !important;" */
.card-header-brand {
    background: var(--brand-red) !important;
    color: #fff !important;
    border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .card-header-brand a,
    .card-header-brand button {
        color: #fff;
    }

/* Status badges for warranty cards */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}

.status-badge--active {
    background: #e6f6ec;
    color: #1a7a3d;
}

.status-badge--inactive {
    background: var(--surface-muted);
    color: var(--text-secondary);
}

.status-badge--cancelled {
    background: var(--brand-red-tint);
    color: var(--brand-red-dark);
}

/* Buttons: brand-red primary + neutral outline secondary,
   used in places .btn-info/.btn-primary don't already cover. */
.btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-red) !important;
    border-color: var(--brand-red) !important;
    color: #fff !important;
    border-radius: var(--radius-control) !important;
    padding: 8px 18px;
    font-weight: 600;
}

    .btn-brand:hover, .btn-brand:focus {
        background: var(--brand-red-dark) !important;
        border-color: var(--brand-red-dark) !important;
        color: #fff !important;
    }

.btn-brand-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    border: 1px solid var(--brand-red) !important;
    color: var(--brand-red) !important;
    border-radius: var(--radius-control) !important;
    padding: 8px 18px;
    font-weight: 600;
}

    .btn-brand-outline:hover, .btn-brand-outline:focus {
        background: var(--brand-red-tint) !important;
        color: var(--brand-red) !important;
    }

.btn-link-muted {
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    text-decoration: underline;
    padding: 8px 4px;
    font-weight: 500;
}

    .btn-link-muted:hover, .btn-link-muted:focus {
        color: var(--brand-red) !important;
    }

/* Generic card polish */
.card.br-15, .card.brand-card {
    border-radius: var(--radius-card) !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: box-shadow .15s ease-in;
}

.card.brand-card-hover:hover {
    box-shadow: var(--shadow-card-hover);
}

/* Inline SVG print icon, replaces the Bootstrap-3-only glyphicon-print
   (not available in the Bootstrap 5 pages, so it rendered as nothing). */
.icon-print {
    display: inline-block;
    width: 15px;
    height: 15px;
    vertical-align: -2px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius-card) + 4px);
    box-shadow: var(--shadow-card);
}

    .empty-state .empty-state-title {
        color: var(--text-primary);
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

.navbar-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .navbar-title-text {
        display: none;
    }
}

/* Simple pill stepper used in the guest login modal */
.step-pill {
    display: inline-block;
    background: var(--surface-muted);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    padding: 3px 12px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.alert {
    border: 1px solid transparent;
    border-radius: calc(var(--radius-control) + 4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.alert-warning {
    background: #fff7e6;
    border-color: #f1d3a5;
    color: #8a5a00;
}

.alert-danger {
    background: var(--brand-red-tint);
    border-color: rgba(182, 0, 3, .18);
    color: var(--brand-red-dark);
}

.modal-content {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 20px;
    box-shadow: var(--shadow-modal);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(247, 247, 248, .92) 0%, rgba(255, 255, 255, .98) 100%);
}

.modal-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(247, 247, 248, .65);
}

    .modal-footer .btn {
        min-width: 120px;
    }

.close {
    opacity: .72;
    color: var(--text-secondary);
    text-shadow: none;
}

    .close:hover,
    .close:focus {
        opacity: 1;
        color: var(--brand-red-dark);
    }

.card-actions {
    gap: 12px !important;
}

    .card-actions .btn,
    .card-actions .btn-brand,
    .card-actions .btn-brand-outline {
        justify-content: center;
    }

@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 16px;
    }

    .modal-body,
    .modal-header,
    .modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .card-actions .btn,
    .card-actions .btn-brand,
    .card-actions .btn-brand-outline,
    .card-actions .btn-link-muted {
        width: 100%;
    }
}
