/* Define your custom font */
@font-face {
    font-family: 'VazirMedium';
    src: url('../font/Vazir-Medium-FD-WOL.woff2') format('woff2');
    font-weight: 500; /* optional: match the font’s weight */
    font-style: normal; /* optional */
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'VazirMedium', sans-serif;
}


body{
    font-family: VazirMedium, sans-serif;
    margin:auto;
    direction: rtl;
    background: var(--bg);
    color: var(--text);
}


/* -----------------------------
   THEME VARIABLES
------------------------------*/

:root{

    --bg:#f5f5f5;
    --card:#ffffff;
    --text:#222;

    --header-bg:#fff;
    --input-bg:#fff;

    --border:#dddddd;

    --primary:#2563eb;
    --success:#16a34a;
    --danger:#dc2626;

}

body.dark{

    --bg:#1c1c1c;
    --card: #363636;
    --text:#f3f4f6;

    --header-bg:#222;
    --input-bg:#2a2a2a;

    --border:#4b5563;

    --primary:#3b82f6;
    --success:#22c55e;
    --danger:#ef4444;

}


/* -----------------------------
   LAYOUT
------------------------------*/

.container{
    max-width:1200px;
    margin:auto;
    padding:20px;
}

.card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:10px;
    padding:20px;
}


/* -----------------------------
   HEADER
------------------------------*/

.header{

    background: var(--header-bg);
    border-bottom:1px solid var(--border);

    padding:15px 25px;

    display:flex;
    justify-content:space-between;
    align-items:center;
    position: sticky;
    top: 0;
    z-index: 10;

}

.header h1{
    font-size:18px;
    margin:0;
}

.header .actions{
    display:flex;
    gap:10px;
}


/* -----------------------------
   BUTTONS
------------------------------*/

button{
    padding:8px 14px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    font-size:16px;
}

.btn-primary{
    background:var(--primary);
    color:white;
}

.btn-success{
    background:var(--success);
    color:white;
}

.btn-danger{
    background:var(--danger);
    color:white;
}

button:hover{
    opacity:.70;
}

a.btn{
    text-decoration: none;
}


/* -----------------------------
   INPUTS
------------------------------*/

input[type=text],
input[type=number],
input,
textarea,
select{

    width:100%;
    padding:10px;

    border-radius:6px;
    border:1px solid var(--border);

    background:var(--input-bg);
    color:var(--text);

    box-sizing:border-box;
}

textarea{
    resize:vertical;
}


/* -----------------------------
   TABLE
------------------------------*/

table{
    width:100%;
    border-collapse:collapse;
    background:var(--card);
}

th, td{

    padding:10px;
    border-bottom:1px solid var(--border);
    text-align:center;

}

th{
    background:var(--primary);
    color:white;
}

tr:hover{
    background:rgba(0,0,0,0.04);
}


/* -----------------------------
   BADGES
------------------------------*/

.badge{
    padding:4px 8px;
    border-radius:6px;
    font-size:12px;
    color:white;
}

.badge-new{background:#3b82f6;}
.badge-domain{background:#a855f7;}
.badge-install{background:#06b6d4;}
.badge-complete{background:#16a34a;}
.badge-suspend{background:#dc2626;}


/* -----------------------------
   ALERT
------------------------------*/

.alert{

    padding:12px;
    border-radius:6px;
    margin-bottom:15px;

}

.alert-success{
    background:#d1fae5;
    color:#065f46;
}

.alert-error{
    background:#fee2e2;
    color:#7f1d1d;
}


/* -----------------------------
   UTILITIES
------------------------------*/

.mt10{margin-top:10px;}
.mt20{margin-top:20px;}
.mt30{margin-top:30px;}

.text-center{text-align:center;}
.flex{display:flex;}
.flex-between{justify-content:space-between;}
.flex-center{align-items:center;}
.gap10{gap:10px;}




/* -----------------------------
   Fetch loading
------------------------------*/
#loadingOverlay{
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background:rgba(0,0,0,0.45);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.loaderBox{
    background:var(--card);
    padding:30px;
    border-radius:10px;
    text-align:center;
    width:260px;
}

.spinner{
    width:40px;
    height:40px;
    color: var(--text);
    border:4px solid var(--header-bg);
    border-top:4px solid #2563eb;
    border-radius:50%;
    margin:auto;
    animation:spin 1s linear infinite;
}

@keyframes spin{
    100%{transform:rotate(360deg);}
}

#cancelBtn{
    margin-top:15px;
    background:#dc2626;
}
