/* ProyectosGU - Portal padre - paleta tomada del TTS */
:root {
    --bg:        #f6f3ee;
    --card:      #ffffff;
    --ink:       #1c1a17;
    --muted:     #8b8478;
    --line:      #e8e2d6;
    --accent:    #5b6c5d;
    --accent-d:  #455146;
    --accent-l:  #748b76;
    --red:       #c44545;
    --shadow:    0 8px 32px rgba(28,26,23,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-d); text-decoration: none; }
a:hover { color: var(--accent); }

/* ------------------------------------------------------------ */
/* LOGIN                                                         */
/* ------------------------------------------------------------ */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: var(--shadow);
}
.login-brand {
    text-align: center;
    margin-bottom: 22px;
}
.brand-dot {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -.02em;
}
.brand-name { font-size: 1.25rem; font-weight: 600; margin: 12px 0 2px; letter-spacing: -.01em; }
.brand-sub  { color: var(--muted); font-size: .82rem; margin: 0; }

.label-small { display:block; font-size:.72rem; color:var(--muted); font-weight:500; text-transform:uppercase; letter-spacing:.08em; margin-bottom:6px; }
.input {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fafaf7;
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
    padding: 11px 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent-l); box-shadow: 0 0 0 4px rgba(91,108,93,.12); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px;
    border: none; border-radius: 10px;
    font: inherit; font-size: .9rem; font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(91,108,93,.3); }
.btn-block { width: 100%; }

.alert-error {
    background: rgba(196,69,69,.08);
    border: 1px solid rgba(196,69,69,.25);
    color: var(--red);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .85rem;
    margin-bottom: 14px;
}

.tiny-info {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.5;
}

/* ------------------------------------------------------------ */
/* HOME con pestañas + iframe                                    */
/* ------------------------------------------------------------ */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.app-header {
    flex: 0 0 auto;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(28,26,23,.02);
    padding: 0 16px;
}
.app-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 52px;
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 8px;
}
.app-brand .brand-dot { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
.app-brand .brand-name { font-size: .95rem; margin: 0; font-weight: 600; }

.tabs {
    display: flex;
    gap: 4px;
    flex: 1 1 auto;
    overflow-x: auto;
    height: 52px;
    align-items: stretch;
    scrollbar-width: thin;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    height: 100%;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
}
.tab:hover { color: var(--ink); background: #faf8f3; }
.tab.is-active {
    color: var(--accent-d);
    border-bottom-color: var(--accent);
    background: #fbfaf6;
}
.tab.is-construction { color: #b6ae9c; }
.tab.is-construction::after {
    content: '·';
    color: var(--accent-l);
    margin-left: 4px;
}
.tab i { font-size: 14px; }

.app-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: .82rem;
    white-space: nowrap;
}
.app-user .user-name { font-weight: 500; }
.app-user .user-sep  { color: var(--line); }
.app-user a { color: var(--muted); font-size: .8rem; }
.app-user a:hover { color: var(--red); }

.app-content {
    flex: 1 1 auto;
    background: var(--bg);
    overflow: hidden;
    position: relative;
}
.module-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--bg);
}

/* ------------------------------------------------------------ */
/* Placeholder "En construcción"                                 */
/* ------------------------------------------------------------ */
.construction {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg);
}
.construction-card {
    max-width: 480px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 48px 32px;
    box-shadow: var(--shadow);
}
.construction-icon {
    width: 64px; height: 64px;
    background: #faf8f3;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 16px;
}
.construction h1 { font-size: 1.4rem; font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
.construction .sub { color: var(--muted); font-size: .9rem; margin: 0 0 24px; }
.construction .module-name {
    display: inline-block;
    background: #efeae0;
    color: var(--accent-d);
    padding: 3px 12px;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 500;
}
