/* ===========================================================
   link.lcandotti.com — estilos compartidos
   Estética en armonía con lcandotti.com
   =========================================================== */

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

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Albert Sans", sans-serif;
    font-size: 14px;
    color: #000;
    background: #fff;
    min-height: 100vh;
    padding: 40px;
    line-height: 1.5;
}

@media (max-width: 576px) {
    body { padding: 40px 24px; }
}

/* ===== Cursor parpadeante ===== */
@keyframes anim {
    0%   { opacity: 0; }
    50%  { opacity: 1; }
    100% { opacity: 0; }
}
.cursor {
    animation-name: anim;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    margin-left: 2px;
}

a {
    text-decoration: none;
    color: #000;
}
a:hover { text-decoration: underline; }

/* ===== Login / Guest ===== */
.login-wrap {
    max-width: 460px;
    margin: 80px auto 0;
}
.intro-header { margin-bottom: 48px; }
.brand-title {
    font-weight: 300;
    font-size: 1.8rem;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    line-height: 1.2;
}
.brand-title strong { font-weight: 600; }
.brand-title-sm {
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    line-height: 1;
}
.brand-title-sm strong { font-weight: 600; }
.brand-sub {
    font-weight: 300;
    color: #6c757d;
    font-size: 14px;
}

/* ===== Selector de rol ===== */
.role-select { margin-top: 32px; }
.role-prompt {
    font-weight: 300;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
}
.role-btn {
    width: 100%;
    background: #fff;
    border: 1px solid #CBCCCD;
    padding: 24px;
    margin-bottom: 12px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
    text-decoration: none;
    color: #000;
    transition: all 0.5s ease;
}
.role-btn:hover {
    border-color: #000;
    transform: translateY(-2px);
    text-decoration: none;
}
.role-btn i {
    font-size: 1.3rem;
    color: #c0c0c0;
    transition: color 0.5s ease;
}
.role-btn:hover i { color: #000; }
.role-info { flex: 1; }
.role-title {
    font-weight: 500;
    font-size: 15px;
    color: #000;
    margin-bottom: 4px;
}
.role-desc {
    font-weight: 300;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.login-form { margin-top: 32px; }
.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.hint {
    font-weight: 300;
    color: #c0c0c0;
    font-size: 13px;
    margin-top: 20px;
    text-align: center;
}
.hint em {
    font-style: normal;
    color: #000;
    font-weight: 500;
    background: #f1f1f1;
    padding: 1px 6px;
}

/* ===== Layout principal ===== */
.admin-wrap {
    max-width: 720px;
    margin: 0 auto;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid #CBCCCD;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-badge {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000;
    background: #f1f1f1;
    padding: 3px 8px;
    border: 1px solid #CBCCCD;
}
.link-plain {
    background: transparent;
    border: none;
    color: #c0c0c0;
    font-size: 13px;
    font-weight: 300;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.5s ease;
    padding: 0;
    text-decoration: none;
}
.link-plain:hover {
    color: #000;
    text-decoration: underline;
}

/* ===== Secciones ===== */
.section {
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid #CBCCCD;
}
.section:last-of-type { border-bottom: none; }
.section.no-border {
    border-bottom: none;
    padding-bottom: 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}
.section-title {
    font-weight: 300;
    font-size: 1.15rem;
    letter-spacing: -0.005em;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title i {
    font-size: 1rem;
    color: #c0c0c0;
}
.counter {
    font-weight: 300;
    color: #c0c0c0;
    font-size: 13px;
}

.client-intro {
    font-weight: 300;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ===== Formularios ===== */
.field-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #000;
    margin-bottom: 8px;
}
.label-dim {
    font-weight: 300;
    color: #c0c0c0;
}

.input {
    width: 100%;
    background: #fff;
    border: 1px solid #CBCCCD;
    color: #000;
    padding: 10px 14px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 300;
    font-family: inherit;
    margin-bottom: 24px;
    transition: border-color 0.5s ease;
}
.input::placeholder {
    color: #c0c0c0;
    font-weight: 300;
}

.focus-custom:focus,
.focus-custom:focus-within {
    outline: none;
    border-color: #000;
}

.slug-row {
    display: flex;
    background: #fff;
    border: 1px solid #CBCCCD;
    margin-bottom: 24px;
    overflow: hidden;
    transition: border-color 0.5s ease;
}
.slug-prefix {
    padding: 10px 14px;
    color: #c0c0c0;
    font-size: 14px;
    font-weight: 300;
    background: #f9f9f9;
    border-right: 1px solid #CBCCCD;
    white-space: nowrap;
    font-family: "Source Code Pro", monospace;
}
.slug-input {
    border: none;
    outline: none;
    background: transparent;
    color: #000;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 400;
    font-family: "Source Code Pro", monospace;
    flex: 1;
    min-width: 0;
}
.slug-input::placeholder {
    color: #c0c0c0;
    font-weight: 300;
}

@media (max-width: 576px) {
    .slug-prefix { font-size: 12px; padding: 10px 10px; }
}

/* ===== Botones ===== */
.btn-primary {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.5s ease;
    text-decoration: none;
}
.btn-primary:hover {
    background: #fff;
    color: #000;
    text-decoration: none;
}
.btn-primary i { font-size: 1rem; }

.btn-copy {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.5s ease;
}
.btn-copy:hover {
    background: #000;
    color: #fff;
}
.btn-copy i { font-size: 0.9rem; }

.btn-ghost {
    background: transparent;
    border: 1px solid #CBCCCD;
    color: #6c757d;
    padding: 6px 14px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 300;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.5s ease;
}
.btn-ghost:hover {
    border-color: #000;
    color: #000;
}

/* ===== Created block ===== */
.created-block {
    margin-top: 32px;
    padding: 24px;
    background: #f9f9f9;
    border: 1px solid #CBCCCD;
}
.created-block-large {
    padding: 40px;
    margin-top: 0;
}
.created-label {
    font-size: 12px;
    color: #c0c0c0;
    margin-bottom: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.created-block-large .created-label {
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 300;
    color: #6c757d;
    margin-bottom: 16px;
}
.created-url {
    font-family: "Source Code Pro", monospace;
    font-size: 15px;
    color: #000;
    margin-bottom: 16px;
    word-break: break-all;
    font-weight: 500;
}
.created-block-large .created-url {
    font-size: 18px;
    margin-bottom: 24px;
}

.client-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

/* ===== Mensajes ===== */
.msg {
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 300;
    border: 1px solid;
}
.msg-success {
    background: #f9f9f9;
    border-color: #000;
    color: #000;
}
.msg-error {
    background: #fff;
    border-color: #000;
    color: #000;
    font-weight: 400;
}

/* ===== Lista de links ===== */
.links-list {
    list-style: none;
}
.link-item {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid #f1f1f1;
}
.link-item:last-child { border-bottom: none; }

.link-info {
    flex: 1;
    min-width: 0;
}
.link-slug {
    font-family: "Source Code Pro", monospace;
    font-size: 14px;
    color: #000;
    margin-bottom: 6px;
    word-break: break-all;
    font-weight: 500;
}
.link-slug a { color: #000; text-decoration: none; }
.link-slug a:hover { text-decoration: underline; }
.link-prefix {
    color: #c0c0c0;
    font-weight: 300;
}
.link-target {
    font-size: 12px;
    color: #c0c0c0;
    font-family: "Source Code Pro", monospace;
    font-weight: 300;
    word-break: break-all;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}
.link-target i {
    flex-shrink: 0;
    margin-top: 2px;
}
.link-note {
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
    font-weight: 300;
    font-style: italic;
}
.link-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .link-item {
        flex-direction: column;
        gap: 12px;
    }
}

.empty {
    text-align: center;
    color: #c0c0c0;
    padding: 48px 16px;
    font-weight: 300;
    font-size: 14px;
}

/* ===== Footer ===== */
.page-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #CBCCCD;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #c0c0c0;
    font-weight: 300;
    flex-wrap: wrap;
}
.page-footer .sep { color: #CBCCCD; }

/* ===== Página intermedia de redirect ===== */
.redirect-wrap {
    max-width: 480px;
    margin: 120px auto 0;
    text-align: center;
}
.redirect-mark {
    margin-bottom: 32px;
}
.redirect-loader {
    margin: 32px 0;
    height: 2px;
    background: #f1f1f1;
    overflow: hidden;
    position: relative;
}
.redirect-loader::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: #000;
    transform: translateX(-100%);
    animation: loader 1.5s ease-in-out forwards;
}
@keyframes loader {
    to { transform: translateX(0); }
}
.redirect-message {
    font-weight: 300;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}
.redirect-note {
    font-style: italic;
    color: #000;
    font-weight: 400;
    margin-top: 8px;
}
.redirect-manual {
    margin-top: 32px;
    font-size: 12px;
    color: #c0c0c0;
    font-weight: 300;
}
.redirect-manual a {
    color: #6c757d;
    text-decoration: underline;
    word-break: break-all;
}
.redirect-manual a:hover { color: #000; }

/* ===== Página 404 ===== */
.error-wrap {
    max-width: 480px;
    margin: 120px auto 0;
    text-align: center;
}
.error-code {
    font-weight: 300;
    font-size: 4rem;
    color: #000;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.error-title {
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.error-desc {
    font-weight: 300;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 24px;
}
.error-desc code {
    background: #f1f1f1;
    padding: 2px 8px;
    font-family: "Source Code Pro", monospace;
    font-size: 13px;
}


/* ===== Fix anti-zoom Safari iOS =====
   Safari en iOS hace zoom cuando el input tiene font-size < 16px.
   Forzamos 16px en mobile para evitar ese comportamiento sin romper el desktop. */
@media (max-width: 576px) {
    .input,
    .slug-input,
    input[type="text"],
    input[type="url"],
    input[type="password"],
    input[type="email"] {
        font-size: 16px;
    }
    .slug-prefix {
        font-size: 16px;
    }
}