* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #2c3e50;
    color: white;
    margin-bottom: 2rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover {
    background: #34495e;
}

/* User dropdown in nav */
.nav-dropdown {
    display: inline-block;
    position: relative;
    margin-left: 1rem;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background 0.3s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0rem;
    white-space: nowrap;
}

.nav-dropdown-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.25rem 0 0;
    white-space: nowrap;
}

.nav-dropdown-chevron {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0 0.25rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.nav-dropdown-chevron:hover {
    opacity: 1;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
    background: #34495e;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

@media (hover: hover) {
    .nav-dropdown:hover .nav-dropdown-menu {
        display: block;
    }
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #2c3e50;
    text-decoration: none;
    padding: 0.65rem 1rem;
    font-size: 0.93rem;
    margin: 0;
    border-radius: 0;
    transition: background 0.15s;
}

.nav-dropdown-menu a:hover {
    background: #f0f4f8;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: left;
}

.dashboard-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-card p {
    color: #7f8c8d;
}

.btn-small {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #2980b9;
}

/* Disabled button appearance: dim + not-allowed cursor for clarity */
button[disabled],
.btn[disabled],
.btn:disabled,
button.btn:disabled,
.btn-small[disabled],
.btn-login[disabled],
.btn-submit[disabled],
.submit-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(20%);
}

/* client edit tabs */
.ce-tab {
    background: none;
    border: none;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s;
}

.ce-tab:hover { color: #3498db; }

.ce-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.ce-panel { display: none; }
.ce-panel.active { display: block; }
