/* Founder Admin Shared Styles */

:root {
    --font-lato: 'Lato', sans-serif;
    --brand-color: #B9F040;
    --bg-black: #000000;
    --text-white: #ffffff;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --border: #e2e8f0;
    --border-strong: #cbd5f5;
    --primary: #B9F040;
    --primary-dark: #a0d636;
    --danger: #e53e3e;
    --success: #38a169;
    --text: #1a202c;
    --muted: #718096;
}

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

body {
    font-family: var(--font-lato), "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

body.slideout-open {
    overflow: hidden;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.85);
    z-index: 999;
}

.login-overlay.hidden {
    display: none;
}

.login-container {
    background: var(--surface);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(56, 66, 106, 0.35);
    width: min(380px, 92vw);
}

.login-container h2 {
    margin-bottom: 12px;
}

.login-subtext {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-container input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 12px;
    transition: border 0.2s;
}

.login-container input:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(185, 240, 64, 0.25);
}

.login-error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.login-success {
    color: var(--success);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
    font-family: var(--font-lato);
}

.btn-primary {
    background: var(--brand-color);
    color: var(--bg-black);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #edf2f7;
    color: var(--text);
}

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

.btn-ghost {
    background: transparent;
    color: var(--brand-color);
}

.btn-ghost:hover {
    background: rgba(185, 240, 64, 0.1);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* App Shell */
#appShell {
    display: none;
    min-height: 100vh;
    flex-direction: column;
}

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 5;
}

header h1 {
    font-size: 26px;
    font-weight: 600;
    font-family: var(--font-lato);
    margin: 0;
}

.subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 6px;
    max-width: 640px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
    font-family: var(--font-lato);
}

.breadcrumbs a {
    color: var(--bg-black);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

.breadcrumbs-separator {
    color: var(--muted);
    opacity: 0.5;
}

.back-to-app {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bg-black);
    text-decoration: none;
    font-size: 13px;
    font-family: var(--font-lato);
    margin-bottom: 12px;
    transition: color 0.2s;
}

.back-to-app:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

.founder-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

#founderEmail {
    font-size: 12px;
    color: var(--muted);
}

/* Main Content */
main {
    flex: 1;
    padding: 32px;
    display: flex;
    justify-content: center;
}

.content {
    width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.toolbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

/* Status Messages */
.status-message {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.status-message.success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: var(--success);
}

.status-message.error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: var(--danger);
}

/* Grids and Cards */
.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.domain-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 20px 45px -24px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.domain-header h2 {
    font-size: 18px;
    font-weight: 600;
    word-break: break-word;
}

.domain-meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.description {
    font-size: 14px;
    color: var(--muted);
}

.client-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.client-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(185, 240, 64, 0.35);
    background: rgba(185, 240, 64, 0.12);
    font-size: 12px;
    color: var(--bg-black);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 48px 24px;
    background: rgba(255, 255, 255, 0.7);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.visible {
    display: flex;
}

body.slideout-open .modal-backdrop {
    right: 500px;
    justify-content: center;
}

.modal {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 30px 60px -24px rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-strong);
    width: min(1100px, calc(100vw - 80px));
    max-width: 1100px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.modal header {
    position: static;
    border-bottom: 1px solid var(--border);
    padding: 24px 32px;
    background: #f7f9ff;
    border-radius: 16px 16px 0 0;
}

.modal header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal form {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 2px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(185, 240, 64, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.6;
}

.client-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 2px;
}

.client-option {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.client-option:hover {
    border-color: rgba(185, 240, 64, 0.3);
    background: rgba(185, 240, 64, 0.08);
}

/* Split Button */
.split-button-container {
    display: flex;
    gap: 0;
    position: relative;
}

.split-button-main {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.split-button-dropdown {
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.split-button-dropdown-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1001;
    overflow: hidden;
}

.split-button-dropdown-menu.visible {
    display: block;
}

.split-button-dropdown-menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.split-button-dropdown-menu-item:hover {
    background: var(--bg);
}

/* Tools Grid (founder_admin.html) */
.tools-grid {
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 20px 45px -24px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-card h2 {
    font-size: 18px;
    font-weight: 600;
}

.tool-card p {
    font-size: 14px;
    color: var(--muted);
    flex: 1;
    line-height: 1.5;
}

.tool-card .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tools-list {
    width: min(960px, 100%);
    display: grid;
    gap: 12px;
}

.tools-panel {
    width: min(960px, 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tools-search {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.tools-search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--font-lato);
}

.tools-search input:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(185, 240, 64, 0.15);
}

.tools-search-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.tool-list-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tool-list-item h2 {
    font-size: 17px;
    font-weight: 600;
}

.tool-list-item p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.45;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .founder-meta {
        align-items: flex-start;
    }

    main {
        padding: 24px 20px 48px;
    }

    .domains-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-list {
        width: 100%;
    }

    .tool-list-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

