/* style.css */

/** SaaS App Background */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Inter', 'Roboto', Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #e3f0ff 0%, #f3f7fa 100%);
    min-height: 100vh;
    color: #23262f;
}
.saas-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: radial-gradient(ellipse 80% 60% at 60% 10%, #2979ff22 0%, transparent 80%),
                radial-gradient(circle 25vw at 40vw 100vh, #08192d05 0%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

/** Layout Container */
.container {
    z-index: 10;
    position: relative;
    margin: 38px auto 0 auto;
    max-width: 1080px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(22,34,45,0.14), 0 1.5px 4px #2979ff29;
    border-radius: 18px;
    padding: 36px 28px 36px 28px;
    backdrop-filter: blur(2px);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    border-bottom: 1px solid #eaeef3;
    padding-bottom: 12px;
}
.brand {
    font-size: 1.28rem;
    font-weight: 600;
    color: #2979ff;
    display: flex;
    align-items: center;
    gap: 11px;
    letter-spacing: 0.8px;
}
.beta-badge {
    background: #ffe834;
    color: #23262f;
    font-size: 0.7rem;
    border-radius: 6px;
    padding: 2px 8px;
    font-weight: bold;
    margin-left: 6px;
    letter-spacing: 0.6px;
    vertical-align: middle;
}
nav a {
    color: #23262f;
    font-size: 1rem;
    font-weight: 500;
    margin-left: 28px;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}
nav a:hover, nav a.active {
    color: #2979ff;
}
.logout-btn {
    color: #fff !important;
    background: #2979ff;
    border-radius: 8px;
    padding: 8px 18px !important;
    margin-left: 45px !important;
    transition: background 0.2s;
}
.logout-btn:hover {
    background: #004ab2 !important;
}

/** Main App Headings, Cards */
h1, h2 {
    text-align: left;
    font-family: 'Inter', 'Roboto', sans-serif;
    margin-top: 0;
}
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #23262f;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
}
h2 {
    font-size: 1.19rem;
    color: #2979ff;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 0 #f7faff;
}

.form-card {
    background: #f7faff;
    border: 1px solid #e0e9f7;
    border-radius: 12px;
    padding: 24px 25px 14px 25px;
    box-shadow: 0 1.5px 4px #2979ff12;
    margin-bottom: 35px;
}
.form-card form {
    margin: 0;
}
label {
    display: block;
    font-weight: 600;
    color: #486082;
    margin-top: 14px;
    margin-bottom: 5px;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
}
input[type="text"], input[type="password"], input[type="url"], button, .cta-btn {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 13px;
    margin-top: 4px;
    padding: 11px 13px;
    border-radius: 7px;
    border: 1.2px solid #e2e7ef;
    outline: none;
    font-size: 1.03rem;
    font-family: inherit;
    background: #fff;
    color: #23262f;
    transition: border 0.18s;
}
input:hover,input:focus {
    border: 1.2px solid #2979ff;
}
input[type="url"] {
    margin-bottom: 6px;
}

.add-btn, .cta-btn {
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    background: #f0f7ff;
    color: #2979ff;
    border: none;
    margin-right: 10px;
    margin-bottom: 18px;
    border-radius: 7px;
    padding: 9px 17px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.add-btn:hover {
    background: #e4f0fd;
    color: #0057b8;
}
.cta-btn {
    background: linear-gradient(90deg, #2979ff 80%, #4fa4ff 100%);
    color: #fff;
    margin-top: 6px;
    margin-bottom: 0;
    padding: 11px 20px;
    box-shadow: 0 1.5px 4px #2979ff29;
}
.cta-btn:hover {
    background: linear-gradient(90deg, #1651a9 80%, #2979ff 100%);
}

.alert {
    border-radius: 8px;
    width: 100%;
    padding: 13px 16px;
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.alert.success {
    background: #e9fbe6;
    border-left: 4px solid #40b86d;
    color: #185a28;
}
.alert.error {
    background: #fff3f1;
    border-left: 4px solid #ff4d3b;
    color: #90240a;
}

/** Tables */
.card-table-wrapper {
    overflow-x: auto;
    background: #f8fbfa;
    border-radius: 12px;
}
table.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    margin-bottom: 0;
}
th, td {
    padding: 13px 14px;
    font-size: 1rem;
    white-space: break-spaces;
    text-align: left;
}
th {
    background: #2979ff;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    border: none;
}
tr {
    border-radius: 7px;
    border-bottom: 1.5px solid #e2e7ef;
}
tr:nth-child(even) { background-color: #f7faff; }
tr:hover { background: #e5f1ff44; }
.urls a {
    color: #2979ff;
    text-decoration: underline;
    word-break: break-all;
    display: inline-block;
}
.urls a:hover {
    color: #0057b8;
}

.action-buttons {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
}
.edit-btn, .del-btn {
    padding: 7px 17px;
    font-size: 0.96rem;
    border: none;
    border-radius: 6px;
    color: #fff;
    background: #aaa;
    cursor: pointer;
    opacity: 0.7;
}
.edit-btn {
    background: #00ad67;
}
.edit-btn[disabled], .del-btn[disabled] {
    background: #e2ebf7;
    color: #b6b9c2;
    cursor: not-allowed;
}
.del-btn {
    background: #f93d27;
}
@media (max-width: 900px) {
    .container {
        padding: 14px 4vw 25px 4vw;
    }
    header { flex-direction: column; gap: 8px; }
}
@media (max-width: 540px) {
    .container {
        margin-top: 14px;
        padding: 6vw 1vw 24px 1vw;
        border-radius: 0;
    }
    h1 { font-size: 1.15rem; }
    th, td { font-size: 0.99rem; }
}
.dealer-search-input {
    width: 100%;
    max-width: 350px;
    font-size: 1.03rem;
    padding: 10px 13px 10px 36px;
    border-radius: 7px;
    border: 1.3px solid #d4dff1;
    margin-bottom: 12px;
    background: #f5f9ff url('data:image/svg+xml;utf8,<svg fill="gray" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 14h-.79l-.28-.27a6.471 6.471 0 0 0 1.48-5.34C15.19 5.6 12.36 3 9 3S2.81 5.6 2.81 8.39c0 2.79 2.83 5.39 6.19 5.39 1.61 0 3.09-.59 4.23-1.58l.27.28v.79l4.25 4.25c.42.42 1.08.42 1.5 0s.42-1.08 0-1.5l-4.25-4.25zm-6.5 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat 9px center;
    outline: none;
    box-sizing: border-box;
    margin-top: 0px;
}
.dealer-search-input:focus {
    border-color: #2979ff;
    background-color: #eef4ff;
}