@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 400;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn' ,Tahoma, sans-serif;
    background: #0f172a;
    color: white;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

.login-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.login-subtitle {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.form-control {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 14px;
    color: white;
    font-size: 15px;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    transition: .2s;
}

.btn:hover {
    background: #1d4ed8;
}

.error-box {
    background: rgba(239,68,68,.15);
    border: 1px solid #ef4444;
    color: #fecaca;
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #111827;
    border: 1px solid #1e293b;

    padding: 20px 25px;

    border-radius: 18px;

    margin-bottom: 30px;
}

.card-grid {
    display:grid;
    grid-template-columns:
        repeat(auto-fill,minmax(140px,1fr));
    gap:10px;
}

.file-card {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 10px;
    transition: .2s;
}

.file-card:hover {
    border-color: #2563eb;
    transform: translateY(-4px);
}

.file-card h2 {
    font-size:13px;
    line-height:1.5;
    margin-bottom:6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card p {
    font-size:11px;
    color:#94a3b8;
    margin-bottom:6px;
}

.download-btn {
    display: inline-block;

    background: #2563eb;

    padding:6px 10px;

    border-radius: 8px;

    text-decoration: none;

    color: white;

    font-size:11px;

    transition: .2s;
}

.download-btn:hover {
    transform: translateY(-2px);
}

.layout{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:260px;
    background:#111827;
    border-left:1px solid #1e293b;

    padding:25px;

    position:fixed;

    top:0;
    right:0;

    height:100%;
}

.sidebar-logo{
    font-size:22px;
    font-weight:bold;

    margin-bottom:30px;
}

.sidebar a{
    display:block;

    color:#cbd5e1;

    text-decoration:none;

    padding:12px 15px;

    margin-bottom:8px;

    border-radius:10px;

    transition:.2s;
}

.sidebar a:hover{
    background:#1e293b;
    color:white;
}

.main-content{
    flex:1;

    margin-right:260px;

    padding:25px;
}

.sidebar{
    width:260px;
    height:100vh;

    position:fixed;
    top:0;
    right:0;

    background:#111827;
    border-left:1px solid #334155;

    padding:20px;

    overflow-y:auto;
}

.sidebar-logo{
    font-size:24px;
    font-weight:700;

    margin-bottom:25px;
}

.sidebar-user{
    background:#1e293b;

    padding:15px;

    border-radius:12px;

    margin-bottom:25px;
}

.sidebar a{
    display:block;

    color:#e2e8f0;

    text-decoration:none;

    padding:12px 15px;

    border-radius:10px;

    margin-bottom:8px;

    transition:.2s;
}

.sidebar a:hover{
    background:#2563eb;
}

.logout-link{
    margin-top:25px;
    background:#dc2626;
}

.logout-link:hover{
    background:#b91c1c !important;
}
.dashboard {
    margin-right: 320px;
    padding: 25px;
}

.permission-box{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
    gap:10px;
    margin-top:12px;
}

.permission-item{
    display:flex;
    align-items:center;
    gap:10px;
    background:#1e293b;
    border:1px solid #334155;
    border-radius:12px;
    padding:10px 14px;
    cursor:pointer;
    transition:.2s;
}

.permission-item:hover{
    border-color:#3b82f6;
}

.permission-item input{
    width:18px;
    height:18px;
}

.permission-item span{
    font-size:14px;
}

.department-box{
    background:#1f2937;
    border:1px solid #374151;
    border-radius:12px;
    padding:20px;
    margin-bottom:25px;
}

.department-title{
    font-size:18px;
    font-weight:bold;
    color:#fff;
    margin-bottom:15px;
}

.empty-category{
    color:#9ca3af;
    font-size:14px;
    padding:10px 0;
}

.category-tree{
    list-style:none;
    margin:0;
    padding-right:20px;
}

.category-tree li{
    margin:8px 0;
}

.category-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.category-title{
    color:#fff;
    font-weight:500;
}

.category-actions{
    display:flex;
    gap:8px;
}

.btn-tree{
    text-decoration:none;
    padding:6px 10px;
    border-radius:6px;
    font-size:13px;
}

.btn-add{
    background:#16a34a;
    color:#fff;
}

.btn-edit{
    background:#2563eb;
    color:#fff;
}

.btn-delete{
    background:#dc2626;
    color:#fff;
}