/* ============================================
   Borderland Group Employee Portal
   ============================================ */

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #1e2130;
    --bg-hover: #252836;
    --sidebar-bg: #13151f;
    --sidebar-width: 260px;
    --text-primary: #e8eaf0;
    --text-secondary: #8b8fa8;
    --text-muted: #5a5e72;
    --accent: #5b7cf7;
    --accent-hover: #6e8eff;
    --accent-light: rgba(91, 124, 247, 0.1);
    --border: #2a2d3e;
    --success: #3ecf8e;
    --warning: #f6c90e;
    --error: #e74c3c;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition: all 0.2s ease;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1117 0%, #1a1d27 50%, #0f1117 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 40px;
    box-shadow: var(--shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), #7c5cf7);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(91, 124, 247, 0.3);
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 124, 247, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(91, 124, 247, 0.4);
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-page {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 14px;
    margin: 0;
    border-radius: 10px;
}

.sidebar-logo span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 500;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #7c5cf7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    display: block;
    text-align: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px 40px;
    max-width: 1200px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

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

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 4px;
}

.header-time {
    font-size: 14px;
    color: var(--text-muted);
    text-align: right;
}

/* Sections */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Link Cards Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.link-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.link-card .card-icon svg {
    width: 48px;
    height: 48px;
}

.card-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.card-body p {
    font-size: 13px;
    color: var(--text-secondary);
}

.card-arrow {
    margin-left: auto;
    font-size: 18px;
    color: var(--text-muted);
    transition: var(--transition);
}

.link-card:hover .card-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

/* Links List */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.link-row:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.link-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.link-info {
    flex: 1;
}

.link-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.link-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.link-url {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.info-card {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.info-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .dashboard-page {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .link-url {
        display: none;
    }
}
