/* ===================================================
   Control de Garantías - Estilos Globales
   ===================================================
   Diseño moderno dark mode con glassmorphism
   Tipografía: Inter (Google Fonts)
   =================================================== */

/* === CSS Variables === */
:root {
    /* Colors */
    --bg-primary: #0f1117;
    --bg-secondary: #161822;
    --bg-card: #1a1d2e;
    --bg-card-hover: #1f2337;
    --bg-glass: rgba(26, 29, 46, 0.85);
    --bg-input: #12141f;
    --bg-modal-overlay: rgba(0, 0, 0, 0.6);

    --text-primary: #e8eaf0;
    --text-secondary: #8b8fa3;
    --text-muted: #5c6074;
    --text-heading: #f0f2f7;

    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-primary-glow: rgba(99, 102, 241, 0.25);
    --accent-secondary: #8b5cf6;

    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);

    --border-color: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(99, 102, 241, 0.5);

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--accent-primary-glow);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--accent-primary-glow);
    }

    50% {
        box-shadow: 0 0 20px 4px var(--accent-primary-glow);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

.spinner {
    animation: spin 0.8s linear infinite;
}

/* ===================================================
   LOGIN PAGE
   =================================================== */
.login-body {
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
}

.login-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    margin-bottom: 20px;
    box-shadow: var(--shadow-glow);
}

.login-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 6px;
}

.login-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group .required {
    color: var(--danger);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input:focus~.input-icon,
.input-wrapper input:focus+.input-icon {
    color: var(--accent-primary);
}

.input-wrapper input {
    padding-left: 44px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

input:read-only {
    opacity: 0.6;
    cursor: not-allowed;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8fa3' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 2px 10px var(--accent-primary-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-primary-glow);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-edit:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary-glow);
}

.btn-delete:hover {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-full {
    width: 100%;
    padding: 13px;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

/* === Alerts === */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: var(--danger-bg);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-admin {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: var(--accent-primary-hover);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-tecnico {
    background: var(--info-bg);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-count {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: none;
}

.badge-status {
    font-size: 0.72rem;
    padding: 4px 12px;
}

.badge-recibido {
    background: var(--info-bg);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-en_revision {
    background: var(--warning-bg);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-reparado {
    background: var(--success-bg);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-devuelto {
    background: rgba(107, 114, 128, 0.12);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.badge-no_aplica {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===================================================
   DASHBOARD PAGE
   =================================================== */
.dashboard-body {
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 10% 0%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 100%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
}

/* === Navbar === */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
}

.navbar-brand svg {
    color: var(--accent-primary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 0.65rem;
    line-height: 1;
    margin-top: 3px;
    width: fit-content;
}

/* === Navbar Navigation === */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--border-color);
}

.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

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

.nav-link.active {
    color: var(--accent-primary-hover);
    background: rgba(99, 102, 241, 0.1);
}

/* === User Cell (users table) === */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.badge-self {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.65rem;
    padding: 1px 6px;
}

/* === Main Content === */
.main-content {
    padding: 28px 32px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

/* === Toolbar === */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    padding: 9px 14px 9px 38px;
    width: 280px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
}

.select-filter {
    padding: 9px 36px 9px 14px;
    font-size: 0.85rem;
    min-width: 170px;
}

/* === Table === */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.data-table th {
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 18px;
    font-size: 0.88rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-row {
    transition: background var(--transition-fast);
}

.table-row.clickable-row {
    cursor: pointer;
}

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

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

.serial-cell code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary-hover);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
}

.issue-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
}

.date-cell {
    color: var(--text-secondary);
    font-size: 0.82rem;
    white-space: nowrap;
}

.actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* === Empty State === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

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

.empty-state p {
    font-size: 0.88rem;
}

/* === Table Loader === */
.table-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-secondary);
    gap: 12px;
}

.loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.table-loader p {
    font-size: 0.85rem;
}

/* ===================================================
   MODALS
   =================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-modal-overlay);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(10px) scale(0.97);
    opacity: 0.9;
    transition: all var(--transition-smooth);
}

.modal.modal-open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-sm {
    max-width: 420px;
}

.modal-lg {
    max-width: 700px;
}

/* === Ticket Detail Modal Styles === */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-group.full-width {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.detail-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.detail-group p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.detail-text-box {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 80px;
    white-space: pre-wrap;
}

.detail-text-box:empty {
    display: none;
}

.detail-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.ticket-photo-link {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all var(--transition-fast);
}

.ticket-photo-link:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.ticket-photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ticket-photo-edit-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.ticket-photo-edit-item:hover {
    border-color: var(--accent-primary);
}

.btn-delete-photo {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    opacity: 0.85;
}

.btn-delete-photo:hover {
    background: #ef4444;
    transform: scale(1.1);
    opacity: 1;
}

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

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-heading);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.modal-body {
    padding: 24px 28px;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.82rem !important;
    margin-top: 8px;
}

/* ===================================================
   TOAST NOTIFICATIONS
   =================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 2000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.88rem;
    color: var(--text-primary);
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-smooth);
    min-width: 280px;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-success {
    border-left: 3px solid var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left: 3px solid var(--danger);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-info {
    border-left: 3px solid var(--info);
}

.toast-info .toast-icon {
    color: var(--info);
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
}

.toast-message {
    flex: 1;
}

/* ===================================================
   TICKET HISTORY VIEW
   =================================================== */

/* Clickable table rows */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: var(--bg-card-hover);
}

/* Tablet detail header */
.tablet-detail-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tablet-detail-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary-hover);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.02em;
}

/* Ticket count badge */
.badge-ticket-count {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: var(--accent-primary-hover);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 26px;
    justify-content: center;
}

.badge-none {
    background: rgba(107, 114, 128, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(107, 114, 128, 0.1);
    font-size: 0.78rem;
    min-width: 26px;
    justify-content: center;
}

/* Ticket number badge */
.ticket-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary-hover);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.center-cell {
    text-align: center;
}

.text-muted-inline {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: italic;
}

.notes-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
}

/* View enter animation */
.view-enter {
    animation: fadeIn 0.35s ease-out;
}

/* View history button */
.btn-view:hover {
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-right {
        flex-wrap: wrap;
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .search-box {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
    }

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

    .login-card {
        padding: 36px 28px 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.82rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    .user-details {
        display: none;
    }

    .modal {
        max-width: 100%;
        margin: 10px;
    }

    .modal-header,
    .modal-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === Selection === */
::selection {
    background: var(--accent-primary);
    color: white;
}