:root {
    --portal-red: #b80d12;
    --portal-dark: #1f1f1f;
    --portal-light: #f7f7f8;
    --portal-border: #d8d8db;
    --portal-text: #222;
    --portal-muted: #6b6b6b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--portal-text);
    background: var(--portal-light);
}

.portal-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f8f8, #ffffff);
}

.portal-login-wrap {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.portal-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

.portal-card h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.portal-subtitle {
    margin: 0 0 24px;
    color: var(--portal-muted);
}

.portal-card label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 600;
}

.portal-card input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    font-size: 15px;
}

.portal-button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: var(--portal-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.portal-error {
    background: #ffe5e5;
    color: #9c1f1f;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.portal-success {
    background: #e6f7ea;
    color: #1c7c3e;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.portal-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--portal-border);
    margin-bottom: 20px;
}

.portal-form h2 {
    margin-top: 0;
}

.portal-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.portal-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.portal-form input {
    padding: 10px 12px;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
}

.portal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    white-space: nowrap;
}

.portal-inline {
    display: inline;
}

.portal-inline button {
    border: none;
    background: none;
    padding: 0;
    color: var(--portal-red);
    cursor: pointer;
    font-size: 14px;
}

.portal-body {
    padding: 24px;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.portal-header h1 {
    margin: 0;
    font-size: 26px;
}

.portal-user {
    display: flex;
    gap: 16px;
    align-items: center;
    font-weight: 600;
}

.portal-link {
    color: var(--portal-red);
    text-decoration: none;
}

.portal-muted {
    color: var(--portal-muted);
    margin-top: 0;
    margin-bottom: 12px;
}

.portal-search form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.portal-search input {
    flex: 1 1 320px;
    padding: 12px 14px;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
}

.portal-search button {
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    background: var(--portal-dark);
    color: #fff;
    cursor: pointer;
}

.portal-table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--portal-border);
}

.portal-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.portal-table th,
.portal-table td {
    padding: 14px 16px;
    border-bottom: 2px solid #d1d1d1;
    border-right: 1px solid #cfcfcf;
    text-align: left;
    font-size: 14px;
}

.portal-table th:last-child,
.portal-table td:last-child {
    border-right: none;
}

.portal-table tr {
    border-bottom: 2px solid #d1d1d1;
}

.portal-table tbody tr:last-child {
    border-bottom: none;
}

.portal-table th {
    background: var(--portal-red);
    color: #fff;
    font-weight: 600;
}

.portal-table tr:last-child td {
    border-bottom: none;
}

.portal-empty {
    text-align: center;
    color: var(--portal-muted);
    padding: 24px;
}

@media (max-width: 640px) {
    .portal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .portal-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
