body {
    margin: 40px;
    background: #f5f5f5;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
}

.container {
    max-width: 1100px;
    margin: auto;
}

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

h1 {
    margin: 0;
}

.subtle {
    color: #666;
}

.button {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-weight: bold;
}

.button.secondary {
    background: #666;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

th {
    background: #222;
    color: #fff;
    text-align: left;
    padding: 12px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.empty {
    padding: 40px;
    text-align: center;
    color: #777;
}

.form-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

label {
    display: block;
    font-weight: bold;
    margin-top: 16px;
    margin-bottom: 6px;
}

input,
textarea,
select {
    width: 100%;
    max-width: 600px;
    padding: 9px;
    box-sizing: border-box;
}

textarea {
    min-height: 100px;
}

.actions {
    margin-top: 24px;
}

.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: #111;
    color: #fff;
    border-radius: 10px;
}

.studio-title {
    color: #fff;
    text-decoration: none;
    font-size: 25px;
    font-weight: bold;
}

.studio-header .subtle {
    color: #bbb;
    margin-top: 4px;
}

.studio-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.studio-nav a {
    color: #fff;
    text-decoration: none;
}

.studio-nav a:hover {
    text-decoration: underline;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.dashboard-card {
    display: block;
    padding: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #222;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,.12);
}

.dashboard-card h2 {
    margin: 0 0 8px;
}

.dashboard-card p {
    margin: 0;
    color: #666;
    line-height: 1.45;
}

.login-card {
    max-width: 460px;
    margin: 80px auto;
    padding: 28px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

.alert-error {
    padding: 12px;
    margin-bottom: 18px;
    background: #fde8e8;
    border: 1px solid #e6aaaa;
    border-radius: 6px;
    color: #8a1515;
}

/* Phase 1B User Manager */

.alert-success {
    padding: 12px;
    margin-bottom: 18px;
    background: #e9f7ec;
    border: 1px solid #a8d5b2;
    border-radius: 6px;
    color: #185c27;
}

.table-wrap {
    overflow-x: auto;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #d5d5d5;
    background: #eee;
    font-weight: bold;
}

.avatar-small {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
}

.avatar-placeholder {
    color: #555;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e8e8e8;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.badge-success {
    background: #dff3e3;
    color: #185c27;
}

.badge-warning {
    background: #fff1c7;
    color: #755500;
}

.badge-muted {
    background: #ececec;
    color: #666;
}

fieldset {
    margin: 0 0 26px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

legend {
    padding: 0 8px;
    font-size: 18px;
    font-weight: bold;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
}

.checkbox-label input {
    width: auto;
    max-width: none;
}

@media (max-width: 700px) {
    body {
        margin: 18px;
    }

    .studio-header,
    .header {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Phase 1B Release 3 */

.studio-user-name {
    color: #bbb;
    white-space: nowrap;
}

input[readonly] {
    background: #f2f2f2;
    color: #666;
    cursor: not-allowed;
}

.form-card fieldset:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .studio-nav {
        justify-content: flex-start;
    }
}

/* Castra Realty Marketing Studio foundation footer — v2.1.0 */
html,
body {
    min-height: 100%;
}

body {
    margin: 0;
}

.studio-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.studio-main {
    min-height: 1px;
}

.studio-footer {
    margin-top: auto;
    padding: 22px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.92);
}

.studio-footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #64748b;
    font-size: 0.875rem;
}

.studio-footer-content strong {
    color: #334155;
}

@media (max-width: 720px) {
    .studio-footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}
