/* ============================================
   RESTU - Custom Styles
   Registrasi Surat & Tugas | UNIKOM
   ============================================ */

/* --- Color Palette (dari referensi dashboard UNIKOM) --- */
:root {
    --restu-primary: #2c6fbb;
    --restu-primary-dark: #1a4d8f;
    --restu-primary-light: #4e9af1;
    --restu-secondary: #36b9cc;
    --restu-accent: #1cc88a;
    --restu-warning: #f6c23e;
    --restu-danger: #e74a3b;
    --restu-info: #36b9cc;
    --restu-dark: #2c3e50;
    --restu-sidebar-start: #2c6fbb;
    --restu-sidebar-end: #1a4d8f;
    --restu-gradient: linear-gradient(135deg, var(--restu-primary) 0%, var(--restu-secondary) 100%);
}

/* --- Global --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.88rem;
    color: #3a3b45;
}

/* --- Sidebar Gradient Override --- */
.sidebar .nav-item .nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.83rem;
}

.bg-gradient-primary {
    background-color: var(--restu-primary) !important;
    background-image: linear-gradient(180deg, var(--restu-sidebar-start) 10%, var(--restu-sidebar-end) 100%) !important;
}

.sidebar-brand-text {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 2px;
}

/* --- Cards --- */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08) !important;
}

.card .card-header {
    background-color: transparent;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 600;
}

.border-left-primary { border-left-color: var(--restu-primary) !important; }
.border-left-success { border-left-color: var(--restu-accent) !important; }
.border-left-info { border-left-color: var(--restu-info) !important; }
.border-left-warning { border-left-color: var(--restu-warning) !important; }
.border-left-danger { border-left-color: var(--restu-danger) !important; }

/* --- Stats Cards --- */
.stats-card {
    border-left: 4px solid;
    border-radius: 0.5rem;
}

.stats-card .stats-icon {
    font-size: 2rem;
    opacity: 0.3;
}

/* --- Badge tweaks --- */
.badge {
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.35em 0.65em;
    border-radius: 0.35rem;
}

/* --- Table --- */
.table th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6e707e;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* --- Buttons --- */
.btn {
    font-weight: 500;
    font-size: 0.83rem;
    border-radius: 0.35rem;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: var(--restu-primary);
    border-color: var(--restu-primary);
}

.btn-primary:hover {
    background-color: var(--restu-primary-dark);
    border-color: var(--restu-primary-dark);
}

.btn-success {
    background-color: var(--restu-accent);
    border-color: var(--restu-accent);
}

.btn-info {
    background-color: var(--restu-info);
    border-color: var(--restu-info);
}

/* --- Dashboard Quick Cards --- */
.quick-card {
    cursor: pointer;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12) !important;
}

.quick-card .icon-wrap {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    color: #fff;
}

/* --- Login Page --- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(44, 111, 187, 0.85) 0%, rgba(26, 77, 143, 0.9) 100%),
                url('/images/campus-bg.jpg') center/cover no-repeat;
    position: relative;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 460px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.login-card .login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.login-card .login-header .brand-logo {
    max-height: 60px;
    margin-bottom: 0.5rem;
}

.login-card .login-header h4 {
    color: var(--restu-primary);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.login-card .login-header p {
    color: #6e707e;
    font-size: 0.78rem;
}

.login-card .login-body {
    padding: 1rem 2rem 2rem;
}

.login-card .form-control {
    border-radius: 0.5rem;
    border: 1px solid #d1d3e2;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
}

.login-card .form-control:focus {
    border-color: var(--restu-primary);
    box-shadow: 0 0 0 0.15rem rgba(44, 111, 187, 0.15);
}

.btn-login {
    background: var(--restu-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.7rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    width: 100%;
    transition: opacity 0.2s;
}

.btn-login:hover {
    opacity: 0.9;
    color: #fff;
}

.btn-google {
    background: #4285f4;
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.7rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    width: 100%;
    transition: background 0.2s;
}

.btn-google:hover {
    background: #3367d6;
    color: #fff;
}

.btn-google img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* --- Responsive fixes --- */
@media (max-width: 768px) {
    .sidebar .nav-item .nav-link span {
        font-size: 0.8rem;
    }

    .quick-card .icon-wrap {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .login-card {
        margin: 1rem;
        border-radius: 0.75rem;
    }
}

/* --- Signature Pad --- */
.signature-pad-wrapper {
    border: 2px dashed #d1d3e2;
    border-radius: 0.5rem;
    background: #f8f9fc;
    position: relative;
}

.signature-pad-wrapper canvas {
    width: 100%;
    height: 200px;
}

/* --- Digital Signature Block (di surat) --- */
.digital-signature-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    background: #fafbfc;
}

.digital-signature-block .qr-code {
    flex-shrink: 0;
}

.digital-signature-block .signature-info {
    text-align: center;
}

.digital-signature-block .signature-info .signature-image img {
    max-height: 60px;
}

.digital-signature-block .signature-info .signature-text {
    font-size: 0.65rem;
    color: #888;
    margin-top: 4px;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e3e6f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--restu-primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--restu-primary);
}

.timeline-item.success::before { background: var(--restu-accent); box-shadow: 0 0 0 2px var(--restu-accent); }
.timeline-item.danger::before { background: var(--restu-danger); box-shadow: 0 0 0 2px var(--restu-danger); }
.timeline-item.warning::before { background: var(--restu-warning); box-shadow: 0 0 0 2px var(--restu-warning); }

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* --- Print --- */
@media print {
    .sidebar, .topbar, .scroll-to-top, footer, .btn { display: none !important; }
    #content-wrapper { margin: 0; padding: 0; }
    .card { box-shadow: none !important; border: 1px solid #ddd; }
}
