/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    color: #333;
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.header-nav {
    display: flex;
    align-items: center;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s, transform 0.1s;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-login {
    background-color: #4f46e5;
    color: #fff;
}

.btn-login:hover {
    background-color: #4338ca;
}

.btn-logout {
    background-color: #ef4444;
    color: #fff;
    border: none;
}

.btn-logout:hover {
    background-color: #dc2626;
}

/* Style button_to forms inline */
.header-nav form {
    display: inline;
}

/* Main content styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.landing-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
}

.overview-content p {
    font-size: 1.5rem;
    color: #666;
}

.user-email {
    font-size: 1rem !important;
    color: #999 !important;
    margin-top: 0.5rem;
}

.landing-subtitle {
    font-size: 1rem;
    color: #666;
    margin-top: 1rem;
}

/* Auth styles */
.auth-content {
    padding: 2rem;
}

.auth-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
}

.auth-subtitle {
    color: #666;
    margin-bottom: 1.5rem;
}

.auth-form {
    text-align: left;
}

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

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

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

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.code-input {
    text-align: center;
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem;
    font-family: monospace;
    text-transform: uppercase;
}

.btn-primary {
    background-color: #4f46e5;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-full {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.auth-hint {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #999;
}

/* Alert styles */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-dev {
    background-color: #fefce8;
    color: #ca8a04;
    border: 1px solid #fef08a;
}

.alert-dev code {
    background-color: #fef9c3;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 1.25rem;
    letter-spacing: 2px;
}

/* Settings Layout */
.settings-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.settings-layout {
    display: flex;
    flex: 1;
}

.settings-sidebar {
    width: 220px;
    background-color: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 1.5rem 0;
}

.settings-nav {
    display: flex;
    flex-direction: column;
}

.settings-nav-link {
    padding: 0.75rem 1.5rem;
    color: #666;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.settings-nav-link:hover {
    background-color: #f3f4f6;
    color: #333;
}

.settings-nav-link.active {
    background-color: #eef2ff;
    color: #4f46e5;
    font-weight: 500;
    border-right: 3px solid #4f46e5;
}

.settings-main {
    flex: 1;
    padding: 2rem;
    background-color: #f9fafb;
}

.settings-header {
    margin-bottom: 1.5rem;
}

.settings-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
}

.settings-back-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.settings-back-link:hover {
    color: #4f46e5;
}

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

.settings-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* Settings Table */
.settings-table {
    width: 100%;
    border-collapse: collapse;
}

.settings-table th,
.settings-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.settings-table th {
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.settings-table td.actions {
    white-space: nowrap;
}

.settings-table td.actions form {
    display: inline;
}

/* Settings Form */
.settings-form {
    max-width: 500px;
}

.settings-form .form-group {
    margin-bottom: 1rem;
}

.settings-form .form-group input,
.settings-form .form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.settings-form .form-group input.disabled {
    background-color: #f3f4f6;
    color: #666;
}

.settings-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Invite form */
.invite-form {
    max-width: 600px;
}

.invite-link-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.invite-link-input {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    background-color: #f9fafb;
    min-width: 250px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-viewer {
    background-color: #e0e7ff;
    color: #4338ca;
}

.badge-editor {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-admin {
    background-color: #fce7f3;
    color: #be185d;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}

/* Button variations */
.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.btn-danger {
    background-color: #ef4444;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.empty-state {
    color: #666;
    text-align: center;
    padding: 2rem;
}

.header-link {
    color: inherit;
    text-decoration: none;
}

.header-link:hover {
    color: #4f46e5;
}

.header-divider {
    margin: 0 0.5rem;
    color: #ccc;
}