/******************************************************************************
 *
 * File        : common.css
 * Project     : Digital Visiting Card Management System
 * Description : Global Stylesheet
 *
 ******************************************************************************/

/* ==========================================================================
   CSS RESET
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    font-family:
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    font-size: 1rem;
    line-height: 1.5;

    background: var(--background-color);

    color: var(--text-color);
}

img {
    max-width: 100%;
    display: block;
}

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

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

/* ==========================================================================
   APPLICATION VARIABLES
   ========================================================================== */

:root {

    /* Primary */

    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;

    /* Success */

    --success-color: #16a34a;

    /* Warning */

    --warning-color: #f59e0b;

    /* Danger */

    --danger-color: #dc2626;

    /* Sidebar */

    --sidebar-color: #1e293b;
    --sidebar-hover: #334155;

    /* Background */

    --background-color: #f1f5f9;

    /* Cards */

    --card-color: #ffffff;

    /* Borders */

    --border-color: #e2e8f0;

    /* Text */

    --text-color: #0f172a;

    --secondary-text: #64748b;

    /* Shadows */

    --shadow-small:

        0 2px 8px rgba(0,0,0,.08);

    --shadow-medium:

        0 6px 20px rgba(0,0,0,.12);

    /* Radius */

    --radius-small: 6px;

    --radius-medium: 10px;

    --radius-large: 16px;

    /* Animation */

    --transition:

        all .25s ease-in-out;

}

/* ==========================================================================
   HEADINGS
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {

    margin-top: 0;

    margin-bottom: 1rem;

    font-weight: 600;

    color: var(--text-color);

}

h1 {

    font-size: 2rem;

}

h2 {

    font-size: 1.6rem;

}

h3 {

    font-size: 1.3rem;

}

/* ==========================================================================
   PARAGRAPH
   ========================================================================== */

p {

    margin-top: 0;

    margin-bottom: 1rem;

}

/* ==========================================================================
   CONTAINER
   ========================================================================== */

.container {

    width: min(1400px, 95%);

    margin-inline: auto;

}

/* ==========================================================================
   CARD
   ========================================================================== */

.card {

    background: var(--card-color);

    border-radius: var(--radius-medium);

    box-shadow: var(--shadow-small);

    padding: 1.5rem;

}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {

    display: inline-flex;

    justify-content: center;

    align-items: center;

    gap: .5rem;

    border: none;

    border-radius: var(--radius-small);

    padding: .75rem 1.25rem;

    transition: var(--transition);

}

.btn-primary {

    background: var(--primary-color);

    color: white;

}

.btn-primary:hover {

    background: var(--primary-hover);

}

.btn-success {

    background: var(--success-color);

    color: white;

}

.btn-danger {

    background: var(--danger-color);

    color: white;

}

.btn-warning {

    background: var(--warning-color);

    color: white;

}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */

label {

    display: block;

    margin-bottom: .35rem;

    font-weight: 600;

}

input,
textarea,
select {

    width: 100%;

    padding: .75rem;

    border: 1px solid var(--border-color);

    border-radius: var(--radius-small);

    background: white;

    transition: var(--transition);

}

input:focus,
textarea:focus,
select:focus {

    outline: none;

    border-color: var(--primary-color);

}

/* ==========================================================================
   TABLE
   ========================================================================== */

table {

    width: 100%;

    border-collapse: collapse;

}

th {

    text-align: left;

    background: var(--primary-color);

    color: white;

    padding: .8rem;

}

td {

    padding: .8rem;

    border-bottom: 1px solid var(--border-color);

}

/* ==========================================================================
   FLEX UTILITIES
   ========================================================================== */

.flex {

    display: flex;

}

.flex-between {

    display: flex;

    justify-content: space-between;

    align-items: center;

}

.flex-center {

    display: flex;

    justify-content: center;

    align-items: center;

}

.flex-column {

    display: flex;

    flex-direction: column;

}

/* ==========================================================================
   GRID UTILITIES
   ========================================================================== */

.grid {

    display: grid;

}

.grid-2 {

    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 1rem;

}

.grid-3 {

    display: grid;

    grid-template-columns: repeat(3,1fr);

    gap: 1rem;

}

.grid-4 {

    display: grid;

    grid-template-columns: repeat(4,1fr);

    gap: 1rem;

}

/* ==========================================================================
   SPACING UTILITIES
   ========================================================================== */

.mt-1 {

    margin-top: 1rem;

}

.mt-2 {

    margin-top: 2rem;

}

.mb-1 {

    margin-bottom: 1rem;

}

.mb-2 {

    margin-bottom: 2rem;

}

/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */

.text-center {

    text-align: center;

}

.text-right {

    text-align: right;

}

.text-muted {

    color: var(--secondary-text);

}

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

@media (max-width:992px){

    .grid-4{

        grid-template-columns:repeat(2,1fr);

    }

}

@media (max-width:768px){

    .grid-4,
    .grid-3,
    .grid-2{

        grid-template-columns:1fr;

    }

    .container{

        width:95%;

    }

}


/******************************************************************************
Public Layout
******************************************************************************/

body {

    margin: 0;

    background: #f5f7fa;

    font-family: Arial, Helvetica, sans-serif;

}

.public-header {

    background: #1976d2;

    color: #fff;

    box-shadow: 0 2px 8px rgba(0,0,0,.15);

}

.public-container {

    max-width: 1200px;

    margin: 0 auto;

    padding: 16px 24px;

    display: flex;

    justify-content: space-between;

    align-items: center;

}

.public-logo {

    color: #fff;

    text-decoration: none;

    font-size: 1.3rem;

    font-weight: 700;

}

.public-logo i {

    margin-right: 8px;

}

.public-main {

    min-height: calc(100vh - 150px);

}

.public-footer {

    margin-top: 60px;

    background: #1f2937;

    color: #fff;

    font-size: .9rem;

}

.public-footer .public-container {

    padding-top: 20px;

    padding-bottom: 20px;

}