/* GitOky — shared header and footer (gk- prefix).
   Also imported by app.gitoky.com (celldev-web gitoky-shell.css), so class
   names here are a contract with that repo. Colors follow the landing page
   and the app icon: teal #00827F, sky #4FC1FF. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;700&display=swap");

:root {
    --gk-bg: #0A1214;
    --gk-bg-alt: #0C161A;
    --gk-panel: #101B1F;
    --gk-panel-2: #142126;
    --gk-line: #18252A;
    --gk-line-2: #1F2D33;
    --gk-line-3: #2A3A40;
    --gk-text: #E8EAED;
    --gk-muted: #A7AEB8;
    --gk-dim: #7F8792;
    --gk-brand: #00827F;
    --gk-brand-hover: #00958F;
    --gk-sky: #4FC1FF;
    --gk-sky-hover: #8FD8FF;
    --gk-wait: #F5B547;
    --gk-danger: #FF8A80;
    --gk-font: 'IBM Plex Sans KR', -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
}

.gk-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 24px;
    background: var(--gk-bg);
    border-bottom: 1px solid var(--gk-line);
    font-family: var(--gk-font);
    line-height: 1.5;
    word-break: keep-all;
}
.gk-header a:hover { text-decoration: none; }

/* Logo */
.gk-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--gk-text);
    text-decoration: none;
}
.gk-logo-icon { flex-shrink: 0; }
.gk-logo .c-g { color: #ff6b6b; }
.gk-logo .c-i { color: #ffa94d; }
.gk-logo .c-t { color: #ffd43b; }
.gk-logo .c-o { color: #4FC1FF; }
.gk-logo .c-k { color: #00c49a; }
.gk-logo .c-y { color: #da77f2; }

/* Service nav — the current page is a sky underline on the header's edge. */
.gk-nav {
    display: flex;
    align-self: stretch;
    align-items: stretch;
    gap: 4px;
    font-size: 15px;
    white-space: nowrap;
}
.gk-nav-link {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: var(--gk-muted);
    text-decoration: none;
    transition: color .15s;
}
.gk-nav-link:hover { color: var(--gk-text); }
.gk-nav-link.active {
    color: var(--gk-text);
    font-weight: 500;
    box-shadow: inset 0 -2px 0 var(--gk-sky);
}

/* Right side */
.gk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.gk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--gk-text);
    background: transparent;
    border: 1px solid var(--gk-line-3);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.gk-btn:hover { border-color: var(--gk-muted); }
.gk-btn svg { flex-shrink: 0; }
.gk-btn-text { border-color: transparent; }
.gk-btn-text:hover { border-color: transparent; color: #fff; }
/* Signed out: the landing page's "무료로 시작". */
.gk-btn-primary { background: var(--gk-text); border-color: var(--gk-text); color: var(--gk-bg); }
.gk-btn-primary:hover { background: #fff; border-color: #fff; }

/* Pending agent repository approvals — stays until the owner decides. */
.gk-approval { font-size: 13px; color: var(--gk-wait); background: #1E1A10; border-color: #4A3A1A; }
.gk-approval:hover { border-color: var(--gk-wait); }
.gk-approval-count {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--gk-wait);
    color: var(--gk-bg);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.gk-approval-short { display: none; }

/* Avatar */
.gk-avatar {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--gk-sky);
    background: var(--gk-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}
.gk-avatar:hover { border-color: var(--gk-sky-hover); }

/* Account menu */
.gk-dropdown { position: relative; }
.gk-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 200;
    width: 248px;
    padding: 8px 0;
    background: var(--gk-panel);
    border: 1px solid var(--gk-line-2);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0,0,0,.5);
    font-family: var(--gk-font);
    font-size: 14px;
    text-align: left;
}
.gk-dropdown.open .gk-dropdown-menu { display: block; }
.gk-dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--gk-text);
    text-decoration: none;
}
.gk-dropdown-menu a:hover { background: var(--gk-panel-2); text-decoration: none; }
.gk-dropdown-user { display: block; padding: 10px 16px 12px !important; margin-bottom: 6px; border-bottom: 1px solid var(--gk-line); }
.gk-dropdown-user b { display: block; font-weight: 700; }
.gk-dropdown-user span { display: block; font-size: 13px; color: var(--gk-dim); }
.gk-dropdown-label { padding: 6px 16px 4px; font-size: 12px; color: var(--gk-dim); }
.gk-dropdown-divider { height: 1px; background: var(--gk-line); margin: 6px 0; }
.gk-danger { color: var(--gk-danger) !important; }

/* Footer */
.gk-footer {
    border-top: 1px solid var(--gk-line);
    background: var(--gk-bg);
    font-family: var(--gk-font);
    font-size: 13px;
    color: var(--gk-dim);
    word-break: keep-all;
}
.gk-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.gk-footer a { color: var(--gk-dim); text-decoration: none; }
.gk-footer a:hover { color: var(--gk-text); text-decoration: none; }
.gk-footer .gk-footer-strong { color: var(--gk-muted); font-weight: 700; }
.gk-footer-contact { margin-left: auto; }

/* Phone: the nav moves to its own scrolling row instead of shrinking. */
@media (max-width: 1100px) {
    .gk-header { height: auto; flex-wrap: wrap; gap: 0 10px; padding: 0 16px; }
    .gk-logo { height: 56px; font-size: 17px; }
    .gk-actions { gap: 8px; }
    .gk-new-app { display: none; }
    .gk-nav {
        order: 3;
        flex-basis: calc(100% + 32px);
        margin: 0 -16px;
        padding: 0 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .gk-nav::-webkit-scrollbar { display: none; }
    .gk-nav-link { height: 44px; padding: 0 10px; flex-shrink: 0; }
    .gk-approval-long { display: none; }
    .gk-approval-short { display: inline; }
    .gk-approval { padding: 6px 10px; font-weight: 700; }
    .gk-footer-inner { padding: 16px; gap: 6px 16px; }
    .gk-footer-contact { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 400px) {
    .gk-header .gk-btn-text { padding-left: 8px; padding-right: 8px; }
}

/* Project colours — slot = the project's position in the user's own order
   (activity.ProjectTones), so a project is one colour on /home and /projects.
   Every tone carries white text. .tone-x is "no project claims this". */
.tone-0  { --tone: #1f6feb; } .tone-1  { --tone: #2ea043; } .tone-2  { --tone: #bf8700; }
.tone-3  { --tone: #8957e5; } .tone-4  { --tone: #da3633; } .tone-5  { --tone: #0e8a9a; }
.tone-6  { --tone: #c2410c; } .tone-7  { --tone: #bf3989; } .tone-8  { --tone: #5a7d1a; }
.tone-9  { --tone: #4f5bd5; } .tone-10 { --tone: #8b5a2b; } .tone-11 { --tone: #0b6e4f; }
.tone-x  { --tone: #484f58; }

/* Access management: real links preserve history and work without JavaScript. */
.access-tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--gk-line);margin:20px 0 24px;white-space:nowrap}
.access-tabs a{padding:12px 16px;color:var(--gk-muted);text-decoration:none;flex-shrink:0}
.access-tabs a[aria-current=page]{color:var(--gk-text);box-shadow:inset 0 -2px 0 var(--gk-sky)}
.access-help{color:var(--gk-muted);line-height:1.7;margin:12px 0}
.access-emergency{margin-top:32px}.access-emergency>summary{cursor:pointer;color:#f85149;padding:16px 0}
@media(min-width:769px) and (max-width:1150px){.gk-header{gap:12px;padding:0 16px}.gk-nav-link{padding:0 8px}.gk-actions{gap:4px}.gk-actions .gk-btn{padding:7px 8px}}

.access-table{overflow-x:auto;max-width:100%;margin:12px 0}.access-table table{min-width:640px}

.access-table .device-repo-table{min-width:0;width:100%}.device-repo-table td:first-child{overflow-wrap:anywhere;word-break:break-word}.device-repo-table select{max-width:100%}
