/* Formomatic Dashboard CSS */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

a {
    color: #4a9d7e;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1.5rem;
    min-height: 64px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.impersonation-banner {
    flex: 1 1 100%;
    order: -1;
    margin-bottom: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a9d7e;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #4a9d7e;
    text-decoration: none;
    border-bottom-color: #4a9d7e;
}

.user-menu {
    position: relative;
}

.user-name {
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: #f7fafc;
    border-radius: 6px;
}

.user-menu .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 100;
}

.user-menu:hover .dropdown {
    display: block;
}

.user-menu .dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #4a5568;
}

.user-menu .dropdown a:hover {
    background: #f7fafc;
    text-decoration: none;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: #4a9d7e;
    color: #fff;
}

.btn-primary:hover {
    background: #3d8268;
    color: #fff;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    background: #fc8181;
    color: #fff;
}

.btn-danger:hover {
    background: #f56565;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #4a9d7e;
    box-shadow: 0 0 0 3px rgba(74, 157, 126, 0.1);
}

.form-hint {
    font-size: 0.8125rem;
    color: #718096;
    margin-top: 0.375rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #68d391;
}

.alert-info {
    background: #bee3f8;
    color: #2b6cb0;
    border: 1px solid #63b3ed;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #a0aec0;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    padding: 0 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #718096;
    font-size: 0.875rem;
}

/* Google Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    text-decoration: none;
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* Form List */
.form-list {
    display: grid;
    gap: 1rem;
}

.form-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.form-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #f7fafc;
    border-color: #cbd5e0;
}

.form-item-info {
    flex: 1;
}

.form-item-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.form-item-meta {
    font-size: 0.8125rem;
    color: #718096;
}

.form-item-actions {
    display: flex;
    gap: 0.5rem;
}

.form-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
}

.form-status.active {
    background: #c6f6d5;
    color: #276749;
}

.form-status.disabled {
    background: #fed7d7;
    color: #c53030;
}

.form-status.pending {
    background: #feebc8;
    color: #c05621;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 0.5rem 0;
    }

    .form-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-item-actions {
        width: 100%;
    }

    .form-item-actions .btn {
        flex: 1;
        text-align: center;
    }
}
