:root {
    --primary: #1e3a8a;
    --primary-light: #dbeafe;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  display: inline-block;
  color: #1e3a8a; /* Primary color */
}

.brand-logo path {
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    margin: 0;
    color: var(--text);
    height: 100vh;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.login-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-top: 0;
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

button {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover { opacity: 0.9; }

/* Portal Layout */
.portal-container {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 260px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item:hover { background: #f8fafc; color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

.user-info {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Ticket List */
.ticket-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.1s, box-shadow 0.1s;
    cursor: pointer;
}

.ticket-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    border-color: #cbd5e1;
}

.ticket-status {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open { background: #dbeafe; color: #1e40af; }
.status-inprogress { background: #fef3c7; color: #92400e; }
.status-closed { background: #f1f5f9; color: #64748b; }

.ticket-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-right: 0.5rem;
    letter-spacing: 0.05em;
}

/* Detail View */
.detail-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.comment-section {
    max-width: 800px;
}

.comment {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.comment-author { font-weight: 600; color: var(--text); }
.comment-time { color: var(--text-muted); }

.comment-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 2rem;
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    width: auto;
    padding: 0.5rem 1rem;
}
.btn-secondary:hover { background: #f8fafc; }

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.back-link:hover { color: var(--primary); }

/* Badge for Role */
.role-badge {
    font-size: 0.7rem;
    background: var(--text);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.role-badge.agent { background: var(--primary); }
