/* === Apresentacoes Design - Design System === */

:root {
    --primary: #009CC5;
    --primary-hover: #61BDD7;
    --primary-light: #7FCDE3;
    --bg: #f5f7fa;
    --white: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #e0e0e0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --success: #27ae60;
    --error: #e53935;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* === Header === */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    color: var(--text-light);
    font-size: 14px;
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 6px 14px; font-size: 13px; line-height: 1.4; }

.btn-full { width: 100%; justify-content: center; }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #c62828; }

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

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}



/* === Breadcrumb === */
.breadcrumb {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* === Search === */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s;
}
.search-bar input:focus { outline: none; border-color: var(--primary); }

/* === Card Grid === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h3 { font-size: 16px; margin-bottom: 4px; }

.card-meta { font-size: 13px; color: var(--text-light); }

.card-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.card-thumb-placeholder {
    width: 100%;
    height: 160px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.card-actions .btn {
    font-family: inherit;
    white-space: nowrap;
}

/* === Badges === */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}
.badge-public { background: #e8f5e9; color: #2e7d32; }
.badge-private { background: #fff3e0; color: #e65100; }

/* === Forms === */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    max-width: 600px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint { font-size: 13px; color: var(--text-light); margin-top: 4px; }

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* === Toggle === */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600 !important;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* === Upload Area === */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-area p { color: var(--text-light); font-size: 14px; }

.upload-placeholder,
.upload-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.upload-icon { font-size: 28px; margin-bottom: 4px; }

.upload-selected {
    display: none;
}

.upload-area.has-file {
    border-color: var(--success);
    background: #f0faf4;
}

.upload-filename {
    font-weight: 600;
    color: var(--text) !important;
    word-break: break-all;
}

.upload-size {
    font-size: 13px;
    color: var(--text-light);
}

/* === Key Display === */
.key-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
}

.key-display code {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    flex: 1;
}

/* === Alerts === */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }

/* === Empty State === */
.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 48px;
    grid-column: 1 / -1;
}

/* === Login === */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 14px;
}

.login-card .form-group { text-align: left; }

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-box h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.modal-box p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* === Thumbnail Preview === */
.thumb-preview {
    position: relative;
    display: inline-block;
}

.thumb-preview img {
    width: 100%;
    max-width: 300px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
}

.thumb-change {
    display: block;
    margin-top: 8px;
    cursor: pointer;
}

.upload-area-sm {
    padding: 20px;
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}
.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
    .card-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .form-card { padding: 20px; }
    .header { padding: 0 16px; }
    .container { padding: 20px 16px; }
}
