/* A1 Call Logger - custom theme, no external dependencies */

:root {
    --a1-navy: #011083;
    --a1-navy-dark: #000b5c;
    --a1-blue: #135fae;
    --a1-blue-dark: #0d477f;
    --a1-accent: #1b9bd6;
    --a1-bg: #f2f4f8;
    --a1-card: #ffffff;
    --a1-border: #dbe1ea;
    --a1-text: #22293b;
    --a1-muted: #6b7688;
    --a1-danger: #d9534f;
    --a1-danger-dark: #b23b38;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--a1-bg);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--a1-text);
    font-size: 14px;
}

a {
    color: var(--a1-blue);
    text-decoration: none;
}

/* ---------- Top bar / master page ---------- */
.a1-topbar {
    background: linear-gradient(90deg, var(--a1-navy-dark), var(--a1-navy));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.a1-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.a1-logo {
    height: 34px;
    width: auto;
    display: block;
    border-radius: 5px;
    background: #fff;
    padding: 3px 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.a1-brand-text {
    color: #fff;
}

.a1-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.a1-nav a {
    color: #dce6f7;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.a1-nav a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.a1-nav a.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.a1-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #dce6f7;
}

.a1-logout-btn {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.a1-logout-btn:hover {
    background: rgba(255,255,255,0.25);
}

.a1-content {
    max-width: 1180px;
    margin: 28px auto;
    padding: 0 20px 40px;
}

.a1-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--a1-navy);
    margin: 4px 0 20px;
    border-left: 4px solid var(--a1-accent);
    padding-left: 12px;
}

/* ---------- Cards / panels ---------- */
.a1-card {
    background: var(--a1-card);
    border: 1px solid var(--a1-border);
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(20,33,61,0.06);
    margin-bottom: 20px;
}

.a1-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.a1-card-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--a1-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Forms ---------- */
.a1-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
}

.a1-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--a1-navy);
    margin-bottom: 6px;
}

.a1-field label .req {
    color: var(--a1-danger);
    margin-left: 2px;
}

.a1-field input[type=text],
.a1-field input[type=password],
.a1-field input[type=date],
.a1-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--a1-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--a1-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.a1-field input:focus,
.a1-field select:focus {
    outline: none;
    border-color: var(--a1-blue);
    box-shadow: 0 0 0 3px rgba(29,99,201,0.15);
}

/* Force the native date input to match the look of the other textboxes -
   browsers apply their own chrome to type=date that ignores plain "input" styles. */
.a1-field input[type=date] {
    -webkit-appearance: none;
    appearance: none;
    -moz-appearance: textfield;
    min-height: 34px;
    line-height: 1.4;
    font-family: inherit;
}

.a1-field input[type=date]::-webkit-datetime-edit,
.a1-field input[type=date]::-webkit-datetime-edit-fields-wrapper {
    color: var(--a1-text);
    font-family: inherit;
}

.a1-field input[type=date]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(31%) sepia(80%) saturate(1382%) hue-rotate(190deg) brightness(90%) contrast(96%);
}

.a1-time-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.a1-time-row input {
    width: 60px !important;
    text-align: center;
}

.a1-error {
    color: var(--a1-danger);
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

.a1-msg-success {
    background: #e6f6ea;
    border: 1px solid #b7e4c1;
    color: #1f7a3a;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.a1-msg-error {
    background: #fdecea;
    border: 1px solid #f3c2bd;
    color: #a3312a;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.a1-btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--a1-blue);
    color: #fff;
    transition: background .15s;
}

.a1-btn:hover {
    background: var(--a1-blue-dark);
}

.a1-btn-outline {
    background: #fff;
    color: var(--a1-blue);
    border: 1px solid var(--a1-blue);
}

.a1-btn-outline:hover {
    background: #eaf1fc;
}

.a1-btn-success {
    background: #2f9e52;
}

.a1-btn-success:hover {
    background: #257f42;
}

.a1-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ---------- Search bar ---------- */
.a1-search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 20px;
    align-items: end;
}

.a1-search-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.a1-total-records {
    font-size: 13px;
    color: var(--a1-muted);
    font-weight: 600;
}

/* ---------- Table / grid ---------- */
.a1-table-wrap {
    overflow-x: auto;
}

table.a1-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.a1-grid th {
    background: var(--a1-navy);
    color: #fff;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    white-space: nowrap;
}

table.a1-grid td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--a1-border);
    vertical-align: middle;
}

table.a1-grid tr:nth-child(even) td {
    background: #f8fafc;
}

table.a1-grid tr:hover td {
    background: #eef4fc;
}

.a1-delete-link {
    color: var(--a1-danger);
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 13px;
}

.a1-delete-link:hover {
    color: var(--a1-danger-dark);
    text-decoration: underline;
}

.a1-empty-row td {
    text-align: center;
    padding: 30px;
    color: var(--a1-muted);
}

/* ---------- Login page ---------- */
.a1-login-body {
    background: linear-gradient(135deg, var(--a1-navy-dark), var(--a1-navy));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

.a1-login-card {
    background: #fff;
    width: 380px;
    max-width: 92vw;
    border-radius: 12px;
    padding: 36px 34px 30px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.a1-login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
}

.a1-logo-lg {
    height: 52px;
    padding: 6px 10px;
    margin-bottom: 12px;
}

.a1-login-logo h1 {
    font-size: 19px;
    color: var(--a1-navy);
    margin: 0;
}

.a1-login-logo span {
    font-size: 12px;
    color: var(--a1-muted);
    margin-top: 2px;
}

.a1-login-card .a1-field {
    margin-bottom: 16px;
}

.a1-login-btn {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    margin-top: 6px;
}

@media (max-width: 720px) {
    .a1-form-grid, .a1-search-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Footer ---------- */
.a1-footer {
    text-align: center;
    font-size: 12px;
    color: var(--a1-muted);
    padding: 18px 20px 30px;
}

.a1-footer a {
    color: var(--a1-blue);
    font-weight: 600;
}

.a1-footer a:hover {
    text-decoration: underline;
}

.a1-footer-light {
    color: #b7c3e0;
    margin-top: 22px;
    padding: 0;
}

.a1-footer-light a {
    color: #fff;
}
