
:root {
    --bg: #f6f8fb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success-bg: #ecfdf3;
    --success-text: #166534;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

/* Layout */
.row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin: 24px auto;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
}

.column {
    box-sizing: border-box;
}

.column-80 {
    flex: 1;
    min-width: 0;
}

aside.column {
    width: 240px;
    flex-shrink: 0;
}

/* Side Nav */
.side-nav {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.side-nav .heading {
    margin: 0 0 16px;
    font-size: 18px;
    color: var(--text);
}

.side-nav-item {
    display: block;
    text-decoration: none;
    color: var(--text);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.side-nav-item:hover {
    background: #eef4ff;
    border-color: #c7d2fe;
    color: var(--primary);
}

/* Main Content Card */
.quote.index.content,
.quote.view.content,
.quote.form.content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.quote.index.content h3,
.quote.view.content h3,
.quote.form.content legend {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
}

/* Button */
.button,
button,
input[type="submit"] {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.float-right {
    float: right;
    margin-bottom: 16px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table thead th {
    background: #f3f4f6;
    color: var(--text);
    font-size: 14px;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}

table tbody tr:hover {
    background: #fafcff;
}

table th a {
    text-decoration: none;
    color: var(--text);
}

table th a:hover {
    color: var(--primary);
}

/* View table */
.quote.view.content table th {
    width: 220px;
    background: #f9fafb;
    font-weight: 600;
}

.quote.view.content table td a,
.quote.index.content table td a {
    color: var(--primary);
    text-decoration: none;
}

.quote.view.content table td a:hover,
.quote.index.content table td a:hover {
    text-decoration: underline;
}

/* Actions column links */
.actions a,
.actions form a {
    display: inline-block;
    margin-right: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.actions a:hover,
.actions form a:hover {
    text-decoration: underline;
}

/* Form */
.quote.form.content form {
    margin-top: 8px;
}

fieldset {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fcfdff;
}

legend {
    padding: 0 8px;
}

.input,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
    margin-top: 6px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--text);
}

input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.05);
}

/* Paginator */
.paginator {
    margin-top: 24px;
    padding-top: 12px;
}

.pagination {
    list-style: none;
    display: flex;
    gap: 8px;
    padding-left: 0;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.pagination li,
.pagination a,
.pagination span {
    display: inline-block;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #eef4ff;
    color: var(--primary);
    border-color: #c7d2fe;
}

.paginator p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

/* Status badge look if needed later */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: var(--success-bg);
    color: var(--success-text);
}

/* Hidden sections in add form */
#domesticFields,
#commercialFields,
#exteriorFields {
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 900px) {
    .row {
        flex-direction: column;
    }

    aside.column {
        width: 100%;
    }

    .float-right {
        float: none;
        display: inline-block;
        margin-bottom: 16px;
    }

    .quote.index.content,
    .quote.view.content,
    .quote.form.content,
    .side-nav {
        padding: 20px;
    }
}

.flash-message,
.message,
.success,
.error {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    min-width: 280px;
    max-width: 420px;
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    animation: slideInFade 0.3s ease;
}

.success,
.message.success {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

.error,
.message.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}
