/* Admin Panel — muasam.io */
:root {
    --primary:    #ff6b35;
    --primary-dk: #e55a2b;
    --secondary:  #004e98;
    --text:       #1a1a2e;
    --text-light: #666;
    --bg:         #f8f9fc;
    --card-bg:    #ffffff;
    --border:     #e8ecf1;
    --radius:     10px;
    --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
    --shadow-md:  0 4px 20px rgba(0,0,0,.08);
}

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

body {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── Login ── */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
}

.login-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-mark {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.login-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 28px;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}
.alert-error {
    background: #fff0ee;
    border: 1px solid #ffc5b8;
    color: #c0392b;
}

.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
    background: #fafbfc;
}
.form-group input:focus { border-color: var(--primary); background: #fff; }

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}
.btn-login:hover:not(:disabled) { background: var(--primary-dk); }
.btn-login:disabled { opacity: .55; cursor: not-allowed; }

/* ── Header ── */
.admin-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-logo .logo-mark { width: 34px; height: 34px; font-size: 17px; border-radius: 8px; }
.header-logo .logo-text { font-size: 17px; font-weight: 700; }
.header-logo .logo-text em { font-style: normal; color: var(--text-light); font-weight: 400; font-size: 14px; margin-left: 4px; }

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

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

.btn-logout {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    transition: all .2s;
}
.btn-logout:hover { border-color: var(--primary); color: var(--primary); }

/* ── Main ── */
.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

/* ── Sections ── */
.tool-section { margin-bottom: 48px; }

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.badge-php    { background: #e8f0ff; color: #2b5de8; }
.badge-python { background: #fff8e0; color: #a07000; }
.badge-cli    { background: #f0f0f0; color: #666; }

/* ── Tool Grid ── */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .2s, border-color .2s;
}
.tool-card:hover { box-shadow: var(--shadow-md); border-color: #d0d8e8; }
.tool-card-cli { opacity: .85; }

.tool-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tool-icon { font-size: 18px; line-height: 1; }
.tool-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}

.tool-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
}

.tool-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.tool-file {
    font-size: 11px;
    color: #999;
    background: var(--bg);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-open {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    transition: all .2s;
    white-space: nowrap;
}
.btn-open:hover { background: var(--primary); color: #fff; }

/* ── Mobile ── */
@media (max-width: 600px) {
    .login-wrap { padding: 28px 20px; }
    .tool-grid { grid-template-columns: 1fr; }
    .header-inner { padding: 0 14px; }
    .admin-main { padding: 20px 14px 40px; }
    .tool-count { display: none; }
}
